SET( CMAKE_DEBUG_POSTFIX "d" )
ENDIF(MSVC)
+ IF(NOT(MSVC_VERSION LESS "1300"))
+ # minimum requirement for spaceball device
+ ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501)
+ ADD_DEFINITIONS(-DWINVER=0x0501)
+ ELSE()
# enable the use of Win2000 APIs (needed for really old compilers like MSVC6)
- ADD_DEFINITIONS(-D_WIN32_WINNT=0x0500)
- ADD_DEFINITIONS(-DWINVER=0x0500)
+ ADD_DEFINITIONS(-D_WIN32_WINNT=0x0500)
+ ADD_DEFINITIONS(-DWINVER=0x0500)
+ ENDIF()
+
+ IF(NOT(MSVC_VERSION LESS "1600"))
+ # minimum requirement for WM_TOUCH device
+ ADD_DEFINITIONS(-D_WIN32_WINNT=0x0601)
+ ADD_DEFINITIONS(-DWINVER=0x0601)
+ ENDIF()
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC)
* magellan X-based protocol.
*/
+
#include <GL/freeglut.h>
#include "fg_internal.h"
+#if(_WIN32_WINNT >= 0x0501)
+
/* -- PRIVATE FUNCTIONS --------------------------------------------------- */
extern void fgPlatformInitializeSpaceball(void);
}
fgPlatformInitializeSpaceball();
-
- //sball_initialized = 1;
}
void fgSpaceballClose(void)
{
- fgPlatformSpaceballClose();}
+ fgPlatformSpaceballClose();
+}
int fgHasSpaceball(void)
{
fgPlatformSpaceballSetWindow(window);
}
+#else
+
+void fgInitialiseSpaceball(void)
+{
+}
+
+void fgSpaceballClose(void)
+{
+}
+
+int fgHasSpaceball(void)
+{
+ return 0;
+}
+
+int fgSpaceballNumButtons(void)
+{
+ return 0;
+}
+
+void fgSpaceballSetWindow(SFG_Window *window)
+{
+}
+
+#endif
break;
}
#endif
- //Added by Jinrong Xie <stonexjr at gmail.com> 12/24/2014
- //for SpaceNavigator support on Windows.
+
+#ifdef WM_INPUT
case WM_INPUT:
+ /* Added by Jinrong Xie <stonexjr at gmail.com> for SpaceNavigator support on Windows. Dec 2014 */
if (fgHasSpaceball())
{
fgSpaceballHandleWinEvent(hWnd, wParam, lParam);
}
break;
+#endif
default:
/* Handle unhandled messages */
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
* six degree of freedom navigator.
*/
+#if(_WIN32_WINNT >= 0x0501)
+
#include <GL/freeglut.h>
#include <stdlib.h>
#include "../fg_internal.h"
}
}
}
+
+#endif
\ No newline at end of file