Add RARCH_DISPLAY_CTL_APPLY_STATE_CHANGES

This commit is contained in:
twinaphex 2015-11-20 15:55:09 +01:00
parent 32d070564b
commit 704ff87b12
3 changed files with 11 additions and 11 deletions

View File

@ -1415,7 +1415,7 @@ bool event_command(enum event_command cmd)
return false;
break;
case EVENT_CMD_VIDEO_APPLY_STATE_CHANGES:
video_driver_apply_state_changes();
video_driver_ctl(RARCH_DISPLAY_CTL_APPLY_STATE_CHANGES, NULL);
break;
case EVENT_CMD_VIDEO_SET_NONBLOCKING_STATE:
boolean = true; /* fall-through */

View File

@ -753,14 +753,6 @@ void video_driver_set_filtering(unsigned index, bool smooth)
poke->set_filtering(driver->video_data, index, smooth);
}
void video_driver_apply_state_changes(void)
{
driver_t *driver = driver_get_ptr();
const video_poke_interface_t *poke = video_driver_get_poke_ptr(driver);
if (poke && poke->apply_state_changes)
poke->apply_state_changes(driver->video_data);
}
void video_driver_get_video_output_next(void)
{
@ -1171,6 +1163,15 @@ bool video_driver_ctl(enum rarch_display_ctl_state state, void *data)
switch (state)
{
case RARCH_DISPLAY_CTL_APPLY_STATE_CHANGES:
{
driver_t *driver = driver_get_ptr();
const video_poke_interface_t *poke = video_driver_get_poke_ptr(driver);
if (poke && poke->apply_state_changes)
poke->apply_state_changes(driver->video_data);
}
return true;
case RARCH_DISPLAY_CTL_READ_VIEWPORT:
{
driver_t *driver = driver_get_ptr();

View File

@ -221,6 +221,7 @@ enum rarch_display_type
enum rarch_display_ctl_state
{
RARCH_DISPLAY_CTL_NONE = 0,
RARCH_DISPLAY_CTL_APPLY_STATE_CHANGES,
RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE,
RARCH_DISPLAY_CTL_FRAME_FILTER_IS_32BIT,
RARCH_DISPLAY_CTL_HAS_WINDOWED,
@ -329,8 +330,6 @@ void * video_driver_read_frame_raw(unsigned *width,
void video_driver_set_filtering(unsigned index, bool smooth);
void video_driver_apply_state_changes(void);
void video_driver_get_video_output_next(void);
void video_driver_get_video_output_prev(void);