mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 06:20:48 +00:00
Move 'num_displays' Initialization
-SDL_GetNumVideoDisplays() will always remain the same after the call to SDL_Init(SDL_INIT_VIDEO), so it makes sense to set in GLimp_Init where we do this.
This commit is contained in:
parent
f6a9690a36
commit
03e3c6bf71
1 changed files with 2 additions and 1 deletions
|
@ -99,7 +99,6 @@ InitDisplayIndices(qboolean ClearExisting)
|
|||
static qboolean
|
||||
CreateSDLWindow(int flags, int w, int h)
|
||||
{
|
||||
num_displays = SDL_GetNumVideoDisplays();
|
||||
int displayindex = 0;
|
||||
|
||||
if ( vid_displayindex->value < 0 || vid_displayindex->value >= num_displays)
|
||||
|
@ -256,6 +255,8 @@ GLimp_Init(void)
|
|||
SDL_GetVersion(&version);
|
||||
Com_Printf("SDL version is: %i.%i.%i\n", (int)version.major, (int)version.minor, (int)version.patch);
|
||||
Com_Printf("SDL video driver is \"%s\".\n", SDL_GetCurrentVideoDriver());
|
||||
|
||||
num_displays = SDL_GetNumVideoDisplays();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue