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

Method init

Engine/source/platformSDL/sdlInput.cpp:76–97  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

74
75//------------------------------------------------------------------------------
76void Input::init()
77{
78 Con::printf( "Input Init:" );
79
80 destroy();
81
82 smActive = false;
83 smLastKeyboardActivated = true;
84 smLastMouseActivated = true;
85 smLastJoystickActivated = true;
86
87 SDL_InitSubSystem( SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_EVENTS );
88
89 // Init the current modifier keys
90 setModifierKeys(0);
91 fillAsciiTable();
92 Con::printf( "" );
93
94 // Set ourselves to participate in per-frame processing.
95 Process::notify(Input::process, PROCESS_INPUT_ORDER);
96
97}
98
99//------------------------------------------------------------------------------
100ConsoleFunction( isJoystickDetected, bool, 1, 1, "isJoystickDetected()" )

Callers

nothing calls this directly

Calls 4

printfFunction · 0.85
destroyFunction · 0.85
SDL_InitSubSystemFunction · 0.85
fillAsciiTableFunction · 0.70

Tested by

no test coverage detected