MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ddio_Init

Function ddio_Init

ddio/ddio.cpp:99–120  ·  view source on GitHub ↗

---------------------------------------------------------------------------- Common initialization ---------------------------------------------------------------------------- Initializes DDIO system

Source from the content-addressed store, hash-verified

97// ----------------------------------------------------------------------------
98// Initializes DDIO system
99bool ddio_Init(ddio_init_info *init_info) {
100 static bool first_time = true;
101 bool res;
102 ASSERT(!DDIO_initialized);
103 if (first_time) {
104 atexit(ddio_Close);
105 }
106 mprintf(0, "DDIO system initializing...\n");
107 res = ddio_InternalInit(init_info);
108 if (res) {
109 if (first_time) { // initialize once and only once.
110 timer_Init();
111 }
112 if (!ddio_KeyInit(init_info))
113 Error("Failed to initialize keyboard system.");
114 ddio_MouseInit();
115 }
116 first_time = false;
117 DDIO_initialized = true;
118 joy_Init(init_info->joy_emulation);
119 return res;
120}
121void ddio_Close() {
122 if (DDIO_initialized) {
123 joy_Close();

Callers 5

InitIOFunction · 0.85
GameToEditorFunction · 0.85
EditorToGameFunction · 0.85
InitIOSystemsFunction · 0.85
RestartD3Function · 0.85

Calls 5

ddio_InternalInitFunction · 0.85
ddio_KeyInitFunction · 0.85
ErrorFunction · 0.85
ddio_MouseInitFunction · 0.85
joy_InitFunction · 0.85

Tested by

no test coverage detected