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

Method enable

engine/source/platformEmscripten/EmscriptenInputManager.cpp:276–301  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

274
275//------------------------------------------------------------------------------
276bool UInputManager::enable()
277{
278 disable();
279#ifdef LOG_INPUT
280 Input::log( "Enabling Input...\n" );
281#endif
282
283 mModifierKeys = 0;
284 dMemset( mMouseButtonState, 0, sizeof( mMouseButtonState ) );
285 dMemset( mKeyboardState, 0, 256 );
286
287 InitKeyMaps();
288
289 mJoystickEnabled = false;
290 initJoystick();
291
292 mEnabled = true;
293 mMouseEnabled = true;
294 mKeyboardEnabled = true;
295
296 SDL_EnableKeyRepeat(
297 SDL_DEFAULT_REPEAT_DELAY,
298 SDL_DEFAULT_REPEAT_INTERVAL);
299
300 return true;
301}
302
303//------------------------------------------------------------------------------
304void UInputManager::disable()

Callers

nothing calls this directly

Calls 3

logFunction · 0.85
dMemsetFunction · 0.70
InitKeyMapsFunction · 0.70

Tested by

no test coverage detected