mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
207354059c
9
driver.c
9
driver.c
@ -225,7 +225,7 @@ static void driver_adjust_system_rates(void)
|
||||
if (runloop_ctl(RUNLOOP_CTL_IS_NONBLOCK_FORCED, NULL))
|
||||
command_event(CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE, NULL);
|
||||
else
|
||||
driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL);
|
||||
driver_set_nonblock_state();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -236,7 +236,7 @@ static void driver_adjust_system_rates(void)
|
||||
* If nonblock state is false, sets
|
||||
* blocking state for both audio and video drivers instead.
|
||||
**/
|
||||
static void driver_set_nonblock_state(void)
|
||||
void driver_set_nonblock_state(void)
|
||||
{
|
||||
bool enable = input_driver_is_nonblock_state();
|
||||
|
||||
@ -360,7 +360,7 @@ void drivers_init(int flags)
|
||||
{
|
||||
/* Keep non-throttled state as good as possible. */
|
||||
if (input_driver_is_nonblock_state())
|
||||
driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL);
|
||||
driver_set_nonblock_state();
|
||||
}
|
||||
}
|
||||
|
||||
@ -472,9 +472,6 @@ bool driver_ctl(enum driver_ctl_state state, void *data)
|
||||
driver_adjust_system_rates();
|
||||
}
|
||||
break;
|
||||
case RARCH_DRIVER_CTL_SET_NONBLOCK_STATE:
|
||||
driver_set_nonblock_state();
|
||||
break;
|
||||
case RARCH_DRIVER_CTL_UPDATE_SYSTEM_AV_INFO:
|
||||
{
|
||||
const struct retro_system_av_info **info = (const struct retro_system_av_info**)data;
|
||||
|
12
driver.h
12
driver.h
@ -84,12 +84,6 @@ enum driver_ctl_state
|
||||
* calls audio_monitor_set_refresh_rate(). */
|
||||
RARCH_DRIVER_CTL_SET_REFRESH_RATE,
|
||||
|
||||
/* Sets audio and video drivers to nonblock state.
|
||||
*
|
||||
* If nonblock state is false, sets blocking state for both
|
||||
* audio and video drivers instead. */
|
||||
RARCH_DRIVER_CTL_SET_NONBLOCK_STATE,
|
||||
|
||||
/* Update the system Audio/Video information.
|
||||
* Will reinitialize audio/video drivers.
|
||||
* Used by RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO. */
|
||||
@ -115,6 +109,12 @@ typedef struct driver_ctx_info
|
||||
|
||||
bool driver_ctl(enum driver_ctl_state state, void *data);
|
||||
|
||||
/* Sets audio and video drivers to nonblock state.
|
||||
*
|
||||
* If nonblock state is false, sets blocking state for both
|
||||
* audio and video drivers instead. */
|
||||
void driver_set_nonblock_state(void);
|
||||
|
||||
void drivers_init(int flags);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
@ -1340,8 +1340,8 @@ static bool gl_frame(void *data, const void *frame,
|
||||
if (
|
||||
video_info->black_frame_insertion
|
||||
&& !input_driver_is_nonblock_state()
|
||||
&& !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL)
|
||||
&& !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL))
|
||||
&& !video_info->runloop_is_slowmotion
|
||||
&& !video_info->runloop_is_paused)
|
||||
{
|
||||
video_context_driver_swap_buffers(video_info);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
@ -1933,8 +1933,8 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
if (
|
||||
video_info->black_frame_insertion
|
||||
&& !input_driver_is_nonblock_state()
|
||||
&& !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL)
|
||||
&& !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL))
|
||||
&& !video_info->runloop_is_slowmotion
|
||||
&& !video_info->runloop_is_paused)
|
||||
{
|
||||
vulkan_inject_black_frame(vk, video_info);
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ static void menu_driver_toggle(bool on)
|
||||
else
|
||||
{
|
||||
if (!runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL))
|
||||
driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL);
|
||||
driver_set_nonblock_state();
|
||||
|
||||
if (settings && settings->menu.pause_libretro)
|
||||
command_event(CMD_EVENT_AUDIO_START, NULL);
|
||||
|
@ -372,7 +372,7 @@ void netplay_sync_post_frame(netplay_t *netplay, bool stalled)
|
||||
{
|
||||
netplay->catch_up = false;
|
||||
input_driver_unset_nonblock_state();
|
||||
driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL);
|
||||
driver_set_nonblock_state();
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -524,7 +524,7 @@ void netplay_sync_post_frame(netplay_t *netplay, bool stalled)
|
||||
{
|
||||
netplay->catch_up = false;
|
||||
input_driver_unset_nonblock_state();
|
||||
driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL);
|
||||
driver_set_nonblock_state();
|
||||
}
|
||||
|
||||
}
|
||||
@ -535,7 +535,7 @@ void netplay_sync_post_frame(netplay_t *netplay, bool stalled)
|
||||
/* Are we falling behind? */
|
||||
netplay->catch_up = true;
|
||||
input_driver_set_nonblock_state();
|
||||
driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL);
|
||||
driver_set_nonblock_state();
|
||||
|
||||
}
|
||||
else if (netplay->self_frame_count + 2 < hi_frame_count)
|
||||
|
@ -910,7 +910,7 @@ static enum runloop_state runloop_check_state(
|
||||
input_driver_unset_nonblock_state();
|
||||
else
|
||||
input_driver_set_nonblock_state();
|
||||
driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL);
|
||||
driver_set_nonblock_state();
|
||||
}
|
||||
else if ((runloop_cmd_pressed(old_input, RARCH_FAST_FORWARD_HOLD_KEY)
|
||||
!= runloop_cmd_press(current_input, RARCH_FAST_FORWARD_HOLD_KEY)))
|
||||
@ -919,7 +919,7 @@ static enum runloop_state runloop_check_state(
|
||||
input_driver_set_nonblock_state();
|
||||
else
|
||||
input_driver_unset_nonblock_state();
|
||||
driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL);
|
||||
driver_set_nonblock_state();
|
||||
}
|
||||
|
||||
/* Checks if the state increase/decrease keys have been pressed
|
||||
|
Loading…
x
Reference in New Issue
Block a user