Changeset 3084 for code/trunk/src/core/input
- Timestamp:
- May 26, 2009, 9:20:57 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/core/input/InputManager.cc
r2896 r3084 41 41 #include "ois/OISException.h" 42 42 #include "ois/OISInputManager.h" 43 #include "core/ConsoleCommand.h" 44 45 // HACK 46 #ifdef ORXONOX_PLATFORM_LINUX 47 # include "ois/linux/LinuxMouse.h" 48 #endif 43 49 44 50 #include "util/Exception.h" … … 47 53 #include "core/ConfigValueIncludes.h" 48 54 #include "core/CommandExecutor.h" 49 #include "core/ConsoleCommand.h"50 55 #include "core/CommandLine.h" 51 56 #include "util/Debug.h" … … 64 69 SetConsoleCommand(InputManager, calibrate, true); 65 70 SetConsoleCommand(InputManager, reload, false); 71 #ifdef ORXONOX_PLATFORM_LINUX 72 SetConsoleCommand(InputManager, grabMouse, true); 73 SetConsoleCommand(InputManager, ungrabMouse, true); 74 #endif 66 75 SetCommandLineSwitch(keyboard_no_grab); 67 76 … … 1469 1478 getInstance().reloadInputSystem(joyStickSupport); 1470 1479 } 1480 1481 1482 // ############################################################ 1483 // ##### ugly hacks ##### 1484 // ########## ########## 1485 // ############################################################ 1486 1487 #ifdef ORXONOX_PLATFORM_LINUX 1488 void InputManager::grabMouse() 1489 { 1490 OIS::LinuxMouse* linuxMouse = dynamic_cast<OIS::LinuxMouse*>(singletonRef_s->mouse_); 1491 assert(linuxMouse); 1492 linuxMouse->grab(true); 1493 } 1494 1495 void InputManager::ungrabMouse() 1496 { 1497 OIS::LinuxMouse* linuxMouse = dynamic_cast<OIS::LinuxMouse*>(singletonRef_s->mouse_); 1498 assert(linuxMouse); 1499 linuxMouse->grab(false); 1500 } 1501 #endif 1471 1502 } -
code/trunk/src/core/input/InputManager.h
r2896 r3084 137 137 bool requestEnterState (const std::string& name); 138 138 bool requestLeaveState (const std::string& name); 139 140 #ifdef ORXONOX_PLATFORM_LINUX 141 // HACK! 142 static void grabMouse(); 143 static void ungrabMouse(); 144 #endif 139 145 140 146 void update(const Clock& time);
Note: See TracChangeset
for help on using the changeset viewer.