mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 18:50:29 +00:00
If video driver/video context driver doesn't support windowed mode,
then treat RARCH_CMD_FULLSCREEN_TOGGLE as no-op
This commit is contained in:
parent
bcd5f8aa5b
commit
f30042ff03
2
gfx/gl.c
2
gfx/gl.c
@ -2466,7 +2466,7 @@ static bool gl_has_windowed(void *data)
|
||||
gl_t *gl = (gl_t*)data;
|
||||
|
||||
if (gl && gl->ctx_driver)
|
||||
gl->ctx_driver->has_windowed(gl);
|
||||
return gl->ctx_driver->has_windowed(gl);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2604,6 +2604,13 @@ bool rarch_main_command(unsigned cmd)
|
||||
}
|
||||
break;
|
||||
case RARCH_CMD_FULLSCREEN_TOGGLE:
|
||||
if (!driver.video)
|
||||
return false;
|
||||
if (!driver.video->has_windowed(driver.video_data))
|
||||
return false;
|
||||
|
||||
RARCH_LOG("Gets here mothafuckah!\n");
|
||||
|
||||
/* If we go fullscreen we drop all drivers and
|
||||
* reinitialize to be safe. */
|
||||
g_settings.video.fullscreen = !g_settings.video.fullscreen;
|
||||
|
Loading…
Reference in New Issue
Block a user