Create video_driver_set_nonblock_state

This commit is contained in:
twinaphex 2015-03-22 10:25:51 +01:00
parent 242bfaba78
commit 4a46a8c5d7
3 changed files with 14 additions and 2 deletions

View File

@ -584,3 +584,14 @@ bool video_driver_has_windowed(void)
return false;
return true;
}
void video_driver_set_nonblock_state(bool toggle)
{
driver_t *driver = driver_get_ptr();
if (!driver->video)
return;
if (driver->video->set_nonblock_state)
driver->video->set_nonblock_state(driver->video_data, toggle);
}

View File

@ -274,6 +274,8 @@ void init_video(void);
bool video_driver_has_windowed(void);
void video_driver_set_nonblock_state(bool toggle);
#ifdef __cplusplus
}
#endif

View File

@ -2617,8 +2617,7 @@ bool rarch_main_command(unsigned cmd)
case RARCH_CMD_VIDEO_SET_NONBLOCKING_STATE:
boolean = true; /* fall-through */
case RARCH_CMD_VIDEO_SET_BLOCKING_STATE:
if (driver->video && driver->video->set_nonblock_state)
driver->video->set_nonblock_state(driver->video_data, boolean);
video_driver_set_nonblock_state(boolean);
break;
case RARCH_CMD_VIDEO_SET_ASPECT_RATIO:
if (driver->video_data && driver->video_poke