Skip to content

Commit

Permalink
engine: platform: sdl: fix qboolean to window_mode_t conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Oct 10, 2023
1 parent 59bfc8c commit cb1063c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/platform/sdl/vid_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ qboolean VID_SetMode( void )
Cvar_DirectSet( &vid_fullscreen, "0" );
Con_Reportf( S_ERROR "VID_SetMode: fullscreen unavailable in this mode\n" );
Sys_Warn("fullscreen unavailable in this mode!");
if(( err = R_ChangeDisplaySettings( iScreenWidth, iScreenHeight, window_mode )) == rserr_ok )
if(( err = R_ChangeDisplaySettings( iScreenWidth, iScreenHeight, WINDOW_MODE_WINDOWED )) == rserr_ok )
return true;
}
else if( err == rserr_invalid_mode )
Expand All @@ -1168,7 +1168,7 @@ qboolean VID_SetMode( void )
}

// try setting it back to something safe
if(( err = R_ChangeDisplaySettings( sdlState.prev_width, sdlState.prev_height, window_mode )) != rserr_ok )
if(( err = R_ChangeDisplaySettings( sdlState.prev_width, sdlState.prev_height, WINDOW_MODE_WINDOWED )) != rserr_ok )
{
Con_Reportf( S_ERROR "VID_SetMode: could not revert to safe mode\n" );
Sys_Warn("could not revert to safe mode!");
Expand Down

0 comments on commit cb1063c

Please sign in to comment.