diff --git a/command_event.c b/command_event.c index 2da8d6d219..94a6afdea9 100644 --- a/command_event.c +++ b/command_event.c @@ -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 */ diff --git a/gfx/video_driver.c b/gfx/video_driver.c index ace202abf0..e7d732639f 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -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(); diff --git a/gfx/video_driver.h b/gfx/video_driver.h index d3acbf5554..f17f737ef9 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -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);