------------------------------------------------------------------------------
| 346 | |
| 347 | //------------------------------------------------------------------------------ |
| 348 | void UInputManager::activate() |
| 349 | { |
| 350 | if (mEnabled && !isActive()) |
| 351 | { |
| 352 | mActive = true; |
| 353 | SDL_ShowCursor(SDL_DISABLE); |
| 354 | resetInputState(); |
| 355 | // hack; if the mouse or keyboard has been disabled, re-enable them. |
| 356 | // prevents scripts like default.cs from breaking our input, although |
| 357 | // there is probably a better solution |
| 358 | mMouseEnabled = mKeyboardEnabled = true; |
| 359 | activateMouse(); |
| 360 | activateKeyboard(); |
| 361 | activateJoystick(); |
| 362 | if (gPlatState.mouseLocked) |
| 363 | lockInput(); |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | //------------------------------------------------------------------------------ |
| 368 | void UInputManager::deactivate() |
no test coverage detected