MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / init

Method init

Engine/source/platformSDL/sdlInput.cpp:68–95  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

66
67//------------------------------------------------------------------------------
68void Input::init()
69{
70 Con::printf( "Input Init:" );
71
72 destroy();
73
74 smActive = false;
75 smLastKeyboardActivated = true;
76 smLastMouseActivated = true;
77 smLastJoystickActivated = true;
78
79 SDL_InitSubSystem( SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_EVENTS );
80
81 // Init the current modifier keys
82 setModifierKeys(0);
83 fillAsciiTable();
84 Con::printf( "" );
85
86 smManager = new SDLInputManager;
87 if (smManager)
88 {
89 SDLInputManager::init();
90 }
91
92 // Set ourselves to participate in per-frame processing.
93 Process::notify(Input::process, PROCESS_INPUT_ORDER);
94
95}
96
97//------------------------------------------------------------------------------
98U16 Input::getKeyCode( U16 asciiCode )

Callers

nothing calls this directly

Calls 5

printfFunction · 0.85
SDL_InitSubSystemFunction · 0.85
fillAsciiTableFunction · 0.70
initFunction · 0.70
destroyFunction · 0.50

Tested by

no test coverage detected