MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / activate

Method activate

engine/source/platformEmscripten/EmscriptenInputManager.cpp:348–365  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

346
347//------------------------------------------------------------------------------
348void 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//------------------------------------------------------------------------------
368void UInputManager::deactivate()

Callers 1

activateJoystickMethod · 0.45

Calls 4

isActiveFunction · 0.85
activateMouseFunction · 0.85
activateKeyboardFunction · 0.85
printfFunction · 0.85

Tested by

no test coverage detected