mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Use simular logic in ref_sw:setMode as in ref_gl
This commit is contained in:
parent
f508584067
commit
e48a7f61c6
1 changed files with 3 additions and 2 deletions
|
@ -1479,6 +1479,7 @@ RE_SetMode(void)
|
|||
if ((err = SWimp_SetMode(&vid.width, &vid.height, r_mode->value, fullscreen)) == rserr_ok)
|
||||
{
|
||||
R_InitGraphics( vid.width, vid.height );
|
||||
|
||||
if (r_mode->value == -1)
|
||||
{
|
||||
sw_state.prev_mode = 4; /* safe default for custom mode */
|
||||
|
@ -1498,7 +1499,7 @@ RE_SetMode(void)
|
|||
vid_fullscreen->modified = false;
|
||||
R_Printf(PRINT_ALL, "%s() - fullscreen unavailable in this mode\n", __func__);
|
||||
|
||||
if ((SWimp_SetMode(&vid.width, &vid.height, r_mode->value, 0)) == rserr_ok)
|
||||
if ((err = SWimp_SetMode(&vid.width, &vid.height, r_mode->value, 0)) == rserr_ok)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -1519,7 +1520,7 @@ RE_SetMode(void)
|
|||
}
|
||||
|
||||
/* try setting it back to something safe */
|
||||
if ((SWimp_SetMode(&vid.width, &vid.height, sw_state.prev_mode, 0)) != rserr_ok)
|
||||
if ((err = SWimp_SetMode(&vid.width, &vid.height, sw_state.prev_mode, 0)) != rserr_ok)
|
||||
{
|
||||
R_Printf(PRINT_ALL, "%s() - could not revert to safe mode\n", __func__);
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue