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

Minor Linux fixes: Don't build TUIO, support warpCursor()

mcc 13 лет назад
Родитель
Сommit
22c059054f

+ 1 - 0
Core/Contents/Include/PolySDLCore.h

@@ -52,6 +52,7 @@ namespace Polycode {
 		std::vector<Rectangle> getVideoModes();
 		
 		void setCursor(int cursorType);
+		void warpCursor(int x, int y);
 		void lockMutex(CoreMutex *mutex);
 		void unlockMutex(CoreMutex *mutex);
 		CoreMutex *createMutex();

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

@@ -195,6 +195,10 @@ void SDLCore::setCursor(int cursorType) {
 
 }
 
+void SDLCore::warpCursor(int x, int y) {
+	SDL_WarpMouse(x, y);
+}
+
 void SDLCore::lockMutex(CoreMutex *mutex) {
 	SDLCoreMutex *smutex = (SDLCoreMutex*)mutex;
 	SDL_mutexP(smutex->pMutex);

+ 2 - 2
Modules/Contents/CMakeLists.txt

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