mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
Create video_driver_apply_state_changes
This commit is contained in:
parent
d71de75c56
commit
724c809ca5
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user