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:
twinaphex 2014-10-08 17:30:05 +02:00
parent bcd5f8aa5b
commit f30042ff03
2 changed files with 8 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;