SDL2: fixed crash when some cvars (like in_keyboardDebug) may be dereferenced before initialization, unified that behavior with win32 backend
This commit is contained in:
parent
011688aa93
commit
9557e5fdf5
|
@ -634,12 +634,12 @@ void GLimp_Init( glconfig_t *config )
|
|||
config->driverType = GLDRV_ICD;
|
||||
config->hardwareType = GLHW_GENERIC;
|
||||
|
||||
Key_ClearStates();
|
||||
// This depends on SDL_INIT_VIDEO, hence having it here
|
||||
IN_Init();
|
||||
|
||||
HandleEvents();
|
||||
|
||||
// This depends on SDL_INIT_VIDEO, hence having it here
|
||||
IN_Init();
|
||||
Key_ClearStates();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1369,11 +1369,11 @@ void GLimp_Init( glconfig_t *config )
|
|||
// show main window after all initializations
|
||||
ShowWindow( g_wv.hWnd, SW_SHOW );
|
||||
|
||||
IN_Init();
|
||||
|
||||
HandleEvents();
|
||||
|
||||
Key_ClearStates();
|
||||
|
||||
IN_Init();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1508,11 +1508,11 @@ void VKimp_Init( glconfig_t *config )
|
|||
// show main window after all initializations
|
||||
ShowWindow( g_wv.hWnd, SW_SHOW );
|
||||
|
||||
IN_Init();
|
||||
|
||||
HandleEvents();
|
||||
|
||||
Key_ClearStates();
|
||||
|
||||
IN_Init();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue