1
0
Fork 0

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:
Eugene 2022-02-07 16:24:53 +02:00
parent 011688aa93
commit 9557e5fdf5
2 changed files with 7 additions and 7 deletions

View File

@ -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();
}

View File

@ -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();
}