Просмотр исходного кода

SDL Core fixes, enabled TUIO on Linux

Ivan Safrin 13 лет назад
Родитель
Сommit
e01cd22654

+ 6 - 0
Core/Contents/Source/PolySDLCore.cpp

@@ -58,6 +58,7 @@ SDLCore::SDLCore(PolycodeView *view, int _xRes, int _yRes, bool fullScreen, bool
 	if(SDL_Init(SDL_INIT_VIDEO) < 0) {
 	}
 	
+	eventMutex = createMutex();
 	renderer = new OpenGLRenderer();
 	services->setRenderer(renderer);
 
@@ -72,6 +73,11 @@ SDLCore::SDLCore(PolycodeView *view, int _xRes, int _yRes, bool fullScreen, bool
 }
 
 void SDLCore::setVideoMode(int xRes, int yRes, bool fullScreen, bool vSync, int aaLevel, int anisotropyLevel) {
+	this->xRes = xRes;
+	this->yRes = yRes;
+	this->fullScreen = fullScreen;
+	this->aaLevel = aaLevel;
+
 	SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 24);	
 	SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1);			
 	SDL_GL_SetAttribute( SDL_GL_RED_SIZE,   8);

+ 0 - 2
Modules/Contents/CMakeLists.txt

@@ -17,6 +17,4 @@ ENDIF(FREENECT_FOUND)
  
 ADD_SUBDIRECTORY(UI)
 
-IF(APPLE OR MSVC) # In other words: Not mingw, not linux.
 ADD_SUBDIRECTORY(TUIO)
-ENDIF(APPLE OR MSVC)

+ 5 - 0
Modules/Contents/TUIO/Source/TuioServer.cpp

@@ -21,6 +21,11 @@
 
 #include "TuioServer.h"
 
+#ifndef WIN32
+#include <unistd.h>
+#else
+#endif
+
 using namespace TUIO;
 using namespace osc;