Create video_driver_apply_state_changes

This commit is contained in:
twinaphex 2015-03-23 00:42:55 +01:00
parent d71de75c56
commit 724c809ca5
3 changed files with 22 additions and 7 deletions

View File

@ -821,13 +821,28 @@ void video_driver_set_filtering(unsigned index, bool smooth)
driver_t *driver = driver_get_ptr();
if (!driver)
return NULL;
return;
if (!driver->video)
return NULL;
return;
if (!driver->video_poke)
return NULL;
return;
if (!driver->video_poke->set_filtering)
return NULL;
return;
driver->video_poke->set_filtering(driver->video_data,
index, smooth);
}
void video_driver_apply_state_changes(void)
{
driver_t *driver = driver_get_ptr();
if (!driver)
return;
if (!driver->video)
return;
if (!driver->video_poke)
return;
if (!driver->video_poke->apply_state_changes)
return;
driver->video_poke->apply_state_changes(driver->video_data);
}

View File

@ -312,6 +312,8 @@ void * video_driver_read_frame_raw(unsigned *width,
void video_driver_set_filtering(unsigned index, bool smooth);
void video_driver_apply_state_changes(void);
#ifdef __cplusplus
}
#endif

View File

@ -2606,9 +2606,7 @@ bool rarch_main_command(unsigned cmd)
return false;
break;
case RARCH_CMD_VIDEO_APPLY_STATE_CHANGES:
if (driver->video_data && driver->video_poke
&& driver->video_poke->apply_state_changes)
driver->video_poke->apply_state_changes(driver->video_data);
video_driver_apply_state_changes();
break;
case RARCH_CMD_VIDEO_SET_NONBLOCKING_STATE:
boolean = true; /* fall-through */