Changeset 3276 for code/branches/core4/src/core/input/Mouse.cc
- Timestamp:
- Jul 12, 2009, 4:49:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/core/input/Mouse.cc
r3274 r3276 34 34 #include "core/ConsoleCommand.h" 35 35 36 // HACK (include this as last, X11 seems to define some macros...) 37 #ifdef ORXONOX_PLATFORM_LINUX 38 # include <ois/linux/LinuxMouse.h> 39 #endif 40 36 41 namespace orxonox 37 42 { 38 // HACK:39 SetConsoleCommand(Mouse, setMouseClipping_s, false);40 Mouse* Mouse::instancePointer_s = NULL;41 42 43 Mouse::Mouse(unsigned int id, unsigned int windowWidth, unsigned int windowHeight) 43 44 : super(id) … … 86 87 return true; 87 88 } 89 90 // ############################################################ 91 // ##### ugly hacks ##### 92 // ########## ########## 93 // ############################################################ 94 95 // HACK: 96 SetConsoleCommand(Mouse, setMouseClipping_s, false); 97 #ifdef ORXONOX_PLATFORM_LINUX 98 SetConsoleCommand(Mouse, grabMouse, true); 99 SetConsoleCommand(Mouse, ungrabMouse, true); 100 #endif 101 Mouse* Mouse::instancePointer_s = NULL; 102 103 #ifdef ORXONOX_PLATFORM_LINUX 104 void Mouse::grabMouse() 105 { 106 OIS::LinuxMouse* linuxMouse = dynamic_cast<OIS::LinuxMouse*>(instancePointer_s->oisDevice_); 107 assert(linuxMouse); 108 linuxMouse->grab(true); 109 } 110 111 void Mouse::ungrabMouse() 112 { 113 OIS::LinuxMouse* linuxMouse = dynamic_cast<OIS::LinuxMouse*>(instancePointer_s->oisDevice_); 114 assert(linuxMouse); 115 linuxMouse->grab(false); 116 } 117 #endif 88 118 }
Note: See TracChangeset
for help on using the changeset viewer.