mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Create video_driver_has_windowed
This commit is contained in:
parent
6f59cf8c7d
commit
c4afb2a154
@ -570,3 +570,15 @@ void init_video(void)
|
||||
&dummy_pixels, false, 1, 1, 1.0f);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool video_driver_has_windowed(void)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
if (!driver->video)
|
||||
return false;
|
||||
/* If video driver/context does not support windowed
|
||||
* mode, don't perform command. */
|
||||
if (!driver->video->has_windowed(driver->video_data))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
@ -272,6 +272,8 @@ void uninit_video_input(void);
|
||||
|
||||
void init_video(void);
|
||||
|
||||
bool video_driver_has_windowed(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -2830,11 +2830,7 @@ bool rarch_main_command(unsigned cmd)
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_FULLSCREEN_TOGGLE:
|
||||
if (!driver->video)
|
||||
return false;
|
||||
/* If video driver/context does not support windowed
|
||||
* mode, don't perform command. */
|
||||
if (!driver->video->has_windowed(driver->video_data))
|
||||
if (!video_driver_has_windowed())
|
||||
return false;
|
||||
|
||||
/* If we go fullscreen we drop all drivers and
|
||||
|
Loading…
x
Reference in New Issue
Block a user