mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix web client vid_restart with r_mode -2
If getting the display index of the existing window fails, fallback to the default display size instead of falling back to 640x480. emscripten r_mode -2 worked on window creation but vid_restart fellback to 640x480.
This commit is contained in:
parent
c1ab47a764
commit
99be1151f7
1 changed files with 2 additions and 1 deletions
|
@ -438,10 +438,11 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder, qbool
|
|||
if( display < 0 )
|
||||
{
|
||||
ri.Printf( PRINT_DEVELOPER, "SDL_GetWindowDisplayIndex() failed: %s\n", SDL_GetError() );
|
||||
display = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if( display >= 0 && SDL_GetDesktopDisplayMode( display, &desktopMode ) == 0 )
|
||||
if( SDL_GetDesktopDisplayMode( display, &desktopMode ) == 0 )
|
||||
{
|
||||
displayAspect = (float)desktopMode.w / (float)desktopMode.h;
|
||||
|
||||
|
|
Loading…
Reference in a new issue