| 414 | //------------------------------------------------------------------------------ |
| 415 | |
| 416 | void Input::activate() |
| 417 | { |
| 418 | #ifdef UNICODE |
| 419 | //winState.imeHandle = ImmGetContext( getWin32WindowHandle() ); |
| 420 | //ImmReleaseContext( getWin32WindowHandle(), winState.imeHandle ); |
| 421 | #endif |
| 422 | |
| 423 | if ( !Con::getBoolVariable( "$enableDirectInput" ) ) |
| 424 | return; |
| 425 | |
| 426 | if ( smManager && smManager->isEnabled() && !smActive ) |
| 427 | { |
| 428 | Con::printf( "Activating DirectInput..." ); |
| 429 | #ifdef LOG_INPUT |
| 430 | Input::log( "Activating DirectInput...\n" ); |
| 431 | #endif |
| 432 | smActive = true; |
| 433 | DInputManager* dInputManager = dynamic_cast<DInputManager*>( smManager ); |
| 434 | if ( dInputManager ) |
| 435 | { |
| 436 | if ( dInputManager->isJoystickEnabled() && smLastJoystickActivated ) |
| 437 | dInputManager->activateJoystick(); |
| 438 | } |
| 439 | } |
| 440 | } |
| 441 | |
| 442 | //------------------------------------------------------------------------------ |
| 443 | void Input::deactivate() |
nothing calls this directly
no test coverage detected