From 244c86f66129bd26203a54d64b735e46a9144a38 Mon Sep 17 00:00:00 2001 From: LibretroAdmin <105389611+LibretroAdmin@users.noreply.github.com> Date: Sun, 18 Jun 2023 19:36:28 +0200 Subject: [PATCH] Revert "Frame limiting improvements" This reverts commit c723710c90f15147dae62ae2237f4c7ccc87db45. --- audio/audio_driver.c | 14 ++++---- audio/audio_driver.h | 7 ++-- gfx/video_driver.c | 80 +++++++++++--------------------------------- gfx/video_driver.h | 2 +- menu/menu_driver.c | 66 +++++++++++++++++++----------------- menu/menu_setting.c | 3 +- retroarch.c | 35 +++++++++++++------ runloop.c | 20 +++++------ 8 files changed, 102 insertions(+), 125 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index ce6e5f7fb9c..2bef556ce94 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -797,8 +797,10 @@ bool audio_driver_init_internal( #endif /* Threaded driver is initially stopped. */ - if ( (audio_driver_st.flags & AUDIO_FLAG_ACTIVE) - && audio_cb_inited) + if ( + (audio_driver_st.flags & AUDIO_FLAG_ACTIVE) + && audio_cb_inited + ) audio_driver_start(false); return true; @@ -1442,8 +1444,7 @@ void audio_driver_load_system_sounds(void) task_push_audio_mixer_load(path_ok, NULL, NULL, true, AUDIO_MIXER_SLOT_SELECTION_MANUAL, AUDIO_MIXER_SYSTEM_SLOT_OK); if (path_cancel && audio_enable_menu_cancel) task_push_audio_mixer_load(path_cancel, NULL, NULL, true, AUDIO_MIXER_SLOT_SELECTION_MANUAL, AUDIO_MIXER_SYSTEM_SLOT_CANCEL); - if (audio_enable_menu_notice) - { + if (audio_enable_menu_notice) { if (path_notice) task_push_audio_mixer_load(path_notice, NULL, NULL, true, AUDIO_MIXER_SLOT_SELECTION_MANUAL, AUDIO_MIXER_SYSTEM_SLOT_NOTICE); if (path_notice_back) @@ -1881,10 +1882,11 @@ void audio_driver_menu_sample(void) struct retro_system_av_info *av_info = &video_st->av_info; const struct retro_system_timing *info = (const struct retro_system_timing*)&av_info->timing; - unsigned sample_count = floor(info->sample_rate / info->fps) * 2; + unsigned sample_count = (info->sample_rate / info->fps) * 2; audio_driver_state_t *audio_st = &audio_driver_st; bool check_flush = !( - !(audio_st->flags & AUDIO_FLAG_ACTIVE) + (runloop_flags & RUNLOOP_FLAG_PAUSED) + || !(audio_st->flags & AUDIO_FLAG_ACTIVE) || !audio_st->output_samples_buf); if ((audio_st->flags & AUDIO_FLAG_SUSPENDED)) check_flush = false; diff --git a/audio/audio_driver.h b/audio/audio_driver.h index f47ef31a333..f23e9a30bfb 100644 --- a/audio/audio_driver.h +++ b/audio/audio_driver.h @@ -181,7 +181,7 @@ typedef struct * up to (but excluding) the point where it's converted to 16-bit audio * to give to the driver. */ - float *output_samples_buf; + float *output_samples_buf; size_t output_samples_buf_length; #ifdef HAVE_REWIND int16_t *rewind_buf; @@ -229,7 +229,8 @@ typedef struct size_t buffer_size; size_t data_ptr; - unsigned free_samples_buf[AUDIO_BUFFER_FREE_SAMPLES_COUNT]; + unsigned free_samples_buf[ + AUDIO_BUFFER_FREE_SAMPLES_COUNT]; #ifdef HAVE_AUDIOMIXER float mixer_volume_gain; @@ -251,7 +252,7 @@ typedef struct #endif /* Sample the flush delta-time when fast forwarding to find the correct - resample ratio. */ + ressample ratio. */ retro_time_t last_flush_time; /* Exponential moving average */ retro_time_t avg_flush_delta; diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 6d0df25f455..0b18821d1f8 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -43,10 +43,6 @@ #include "../menu/menu_driver.h" #endif -#ifdef HAVE_NETWORKING -#include "../network/netplay/netplay.h" -#endif - #ifdef _WIN32 #include "common/win32_common.h" #endif @@ -1685,6 +1681,7 @@ void video_driver_set_size(unsigned width, unsigned height) * false (0) if: * a) threaded video mode is enabled * b) less than 2 frame time samples. + * c) FPS monitor enable is off. **/ bool video_monitor_fps_statistics(double *refresh_rate, double *deviation, unsigned *sample_points) @@ -2532,34 +2529,8 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->runloop_is_slowmotion = runloop_st->flags & RUNLOOP_FLAG_SLOWMOTION; video_info->fastforward_frameskip = settings->bools.fastforward_frameskip; -#ifdef _WIN32 -#ifdef HAVE_VULKAN - /* Vulkan in Windows does mailbox emulation - * in fullscreen with vsync, effectively - * discarding frames that can't be shown, - * therefore do not do it twice. */ - if ( string_is_equal(video_driver_get_ident(), "vulkan") - && settings->bools.video_vsync - && video_info->fullscreen) - video_info->fastforward_frameskip = false; -#endif -#endif - -#ifdef HAVE_MENU - /* Count paused running menu also as paused runloop. */ - if (video_info->menu_is_alive) - { -#ifdef HAVE_NETWORKING - video_info->runloop_is_paused |= settings->bools.menu_pause_libretro && - netplay_driver_ctl(RARCH_NETPLAY_CTL_ALLOW_PAUSE, NULL); -#else - video_info->runloop_is_paused |= settings->bools.menu_pause_libretro; -#endif - video_info->runloop_is_paused |= !video_info->libretro_running; - } -#endif - - video_info->input_driver_nonblock_state = input_st ? (input_st->flags & INP_FLAG_NONBLOCKING) : false; + video_info->input_driver_nonblock_state = input_st + ? (input_st->flags & INP_FLAG_NONBLOCKING) : false; video_info->input_driver_grab_mouse_state = (input_st->flags & INP_FLAG_GRAB_MOUSE_STATE); video_info->disp_userdata = disp_get_ptr(); @@ -3291,7 +3262,6 @@ void video_driver_frame(const void *data, unsigned width, video_st->frame_cache_width = width; video_st->frame_cache_height = height; video_st->frame_cache_pitch = pitch; - video_st->frame_discard = false; if ( video_st->scaler_ptr @@ -3310,30 +3280,23 @@ void video_driver_frame(const void *data, unsigned width, video_driver_build_info(&video_info); - /* Take target refresh rate as initial FPS value instead of 0.00 */ - if (!last_fps) - last_fps = video_info.refresh_rate; - /* If fast forward is active and fast forward - * frame skipping is enabled, and when - * paused or menu active, drop any frames - * that occur at a rate higher than display + * frame skipping is enabled, drop any frames + * that occur at a rate higher than the core-set * refresh rate. However: We must always render * the current frame when: + * - The menu is open * - The last frame was NULL and the * current frame is not (i.e. if core was * previously sending duped frames, ensure * that the next frame update is captured) */ - if ( ( video_info.input_driver_nonblock_state - && video_info.fastforward_frameskip - && !(last_frame_duped && !!data) - ) - || video_info.runloop_is_paused - ) + if ( video_info.input_driver_nonblock_state + && video_info.fastforward_frameskip + && !(video_info.menu_is_alive + || (last_frame_duped && !!data))) { retro_time_t frame_time_accumulator_prev = frame_time_accumulator; retro_time_t frame_time_delta = new_time - last_time; - retro_time_t frame_time_target = 1000000.0f / video_info.refresh_rate; /* Ignore initial previous frame time * to prevent rubber band startup */ @@ -3342,10 +3305,6 @@ void video_driver_frame(const void *data, unsigned width, else if (nonblock_active < 0) nonblock_active = 1; - /* Plain paused and unrestricted menu rendering require harsh limiting */ - if (video_info.runloop_is_paused) - video_st->frame_discard = true; - /* Accumulate the elapsed time since the * last frame */ if (nonblock_active > 0) @@ -3354,18 +3313,18 @@ void video_driver_frame(const void *data, unsigned width, /* Render frame if the accumulated time is * greater than or equal to the expected * core frame time */ - render_frame = frame_time_accumulator >= frame_time_target; + render_frame = frame_time_accumulator >= + video_st->core_frame_time; /* If frame is to be rendered, subtract * expected frame time from accumulator */ if (render_frame) { - video_st->frame_discard = false; - frame_time_accumulator -= frame_time_target; + frame_time_accumulator -= video_st->core_frame_time; /* Prevent external frame limiters from * pushing fast forward ratio down to 1x */ - if (frame_time_accumulator + frame_time_accumulator_prev < frame_time_target) + if (frame_time_accumulator + frame_time_accumulator_prev < video_st->core_frame_time) frame_time_accumulator -= frame_time_delta; /* If fast forward is working correctly, @@ -3377,7 +3336,7 @@ void video_driver_frame(const void *data, unsigned width, * will never empty and may potentially * overflow. If a 'runaway' accumulator * is detected, we simply reset it */ - if (frame_time_accumulator > frame_time_target) + if (frame_time_accumulator > video_st->core_frame_time) frame_time_accumulator = 0; } } @@ -3390,9 +3349,6 @@ void video_driver_frame(const void *data, unsigned width, last_time = new_time; last_frame_duped = !data; - if (video_st->frame_discard) - return; - /* Get the amount of frames per seconds. */ if (video_st->frame_count) { @@ -3698,7 +3654,6 @@ void video_driver_frame(const void *data, unsigned width, audio_stats.close_to_underrun = 0.0f; audio_stats.close_to_blocking = 0.0f; - audio_compute_buffer_statistics(&audio_stats); video_monitor_fps_statistics(NULL, &stddev, NULL); video_info.osd_stat_params.x = 0.008f; @@ -3710,7 +3665,10 @@ void video_driver_frame(const void *data, unsigned width, video_info.osd_stat_params.drop_y = (video_info.font_size / DEFAULT_FONT_SIZE) * -3; video_info.osd_stat_params.drop_mod = 0.1f; video_info.osd_stat_params.drop_alpha = 0.9f; - video_info.osd_stat_params.color = COLOR_ABGR(alpha, blue, green, red); + video_info.osd_stat_params.color = COLOR_ABGR( + alpha, blue, green, red); + + audio_compute_buffer_statistics(&audio_stats); latency_stats[0] = '\0'; tmp[0] = '\0'; diff --git a/gfx/video_driver.h b/gfx/video_driver.h index d1f3e3c9589..ae10273f23c 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -776,6 +776,7 @@ typedef struct #endif struct retro_system_av_info av_info; /* double alignment */ retro_time_t frame_time_samples[MEASURE_FRAME_TIME_SAMPLES_COUNT]; + retro_time_t core_frame_time; uint64_t frame_time_count; uint64_t frame_count; uint8_t *record_gpu_buffer; @@ -867,7 +868,6 @@ typedef struct uint8_t frame_delay_effective; bool frame_delay_pause; - bool frame_discard; bool threaded; } video_driver_state_t; diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 738b978a388..17f57e512f0 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -42,7 +42,6 @@ #endif #include "../audio/audio_driver.h" -#include "../midi_driver.h" #include "menu_driver.h" #include "menu_cbs.h" @@ -5078,15 +5077,16 @@ unsigned menu_event( input_driver_state_t *input_st = input_state_get_ptr(); input_driver_t *current_input = input_st->current_driver; const input_device_driver_t - *joypad = input_st->primary_joypad; + *joypad = input_st->primary_joypad; #ifdef HAVE_MFI - const input_device_driver_t *sec_joypad = input_st->secondary_joypad; + const input_device_driver_t *sec_joypad = + input_st->secondary_joypad; #else const input_device_driver_t *sec_joypad = NULL; #endif gfx_display_t *p_disp = disp_get_ptr(); menu_input_pointer_hw_state_t *pointer_hw_state = &menu_st->input_pointer_hw_state; - menu_handle_t *menu = menu_st->driver_data; + menu_handle_t *menu = menu_st->driver_data; bool keyboard_mapping_blocked = input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED; bool menu_mouse_enable = settings->bools.menu_mouse_enable; bool menu_pointer_enable = settings->bools.menu_pointer_enable; @@ -5095,12 +5095,13 @@ unsigned menu_event( bool menu_scroll_fast = settings->bools.menu_scroll_fast; bool pointer_enabled = settings->bools.menu_pointer_enable; unsigned input_touch_scale = settings->uints.input_touch_scale; - unsigned menu_scroll_delay = settings->uints.menu_scroll_delay; + unsigned menu_scroll_delay = + settings->uints.menu_scroll_delay; #ifdef HAVE_OVERLAY bool input_overlay_enable = settings->bools.input_overlay_enable; bool overlay_active = input_overlay_enable - && (input_st->overlay_ptr) - && (input_st->overlay_ptr->flags & INPUT_OVERLAY_ALIVE); + && (input_st->overlay_ptr) + && (input_st->overlay_ptr->flags & INPUT_OVERLAY_ALIVE); #else bool input_overlay_enable = false; bool overlay_active = false; @@ -5268,11 +5269,11 @@ unsigned menu_event( * for old_input_state. */ first_held = true; - delay_count = 0; if (initial_held) delay_timer = menu_scroll_delay; else - delay_timer = menu_scroll_delay / 8; + delay_timer = menu_scroll_fast ? 100 : 20; + delay_count = 0; } if (delay_count >= delay_timer) @@ -5287,26 +5288,26 @@ unsigned menu_event( new_scroll_accel = menu_st->scroll.acceleration; if (menu_scroll_fast) - new_scroll_accel = MIN(new_scroll_accel + 1, 20); + new_scroll_accel = MIN(new_scroll_accel + 1, 64); else new_scroll_accel = MIN(new_scroll_accel + 1, 5); } initial_held = false; - delay_count += anim_get_ptr()->delta_time; } else { set_scroll = true; first_held = false; initial_held = true; - delay_count = 0; navigation_initial = 0; } if (set_scroll) menu_st->scroll.acceleration = (unsigned)(new_scroll_accel); + delay_count += anim_get_ptr()->delta_time; + if (display_kb) { #ifdef HAVE_MIST @@ -6100,6 +6101,7 @@ void menu_driver_toggle( */ video_driver_t *current_video = (video_driver_t*)curr_video_data; bool pause_libretro = false; + bool audio_enable_menu = false; runloop_state_t *runloop_st = runloop_state_get_ptr(); struct menu_state *menu_st = &menu_driver_state; bool runloop_shutdown_initiated = runloop_st->flags & @@ -6118,6 +6120,9 @@ void menu_driver_toggle( #else pause_libretro = settings->bools.menu_pause_libretro; #endif +#ifdef HAVE_AUDIOMIXER + audio_enable_menu = settings->bools.audio_enable_menu; +#endif #ifdef HAVE_OVERLAY input_overlay_hide_in_menu = settings->bools.input_overlay_hide_in_menu; input_overlay_enable = settings->bools.input_overlay_enable; @@ -6172,34 +6177,27 @@ void menu_driver_toggle( menu_st->flags |= MENU_ST_FLAG_ENTRIES_NEED_REFRESH; - /* Enforce menu vsync accordingly. */ - if ( settings->bools.menu_throttle_framerate - && current_video->set_nonblock_state) + /* Menu should always run with vsync on and + * a video swap interval of 1 */ + if (current_video->set_nonblock_state) current_video->set_nonblock_state( video_driver_data, false, - video_driver_test_all_flags(GFX_CTX_FLAGS_ADAPTIVE_VSYNC) && video_adaptive_vsync, - 1); - + video_driver_test_all_flags(GFX_CTX_FLAGS_ADAPTIVE_VSYNC) && + video_adaptive_vsync, + 1 + ); /* Stop all rumbling before entering the menu. */ command_event(CMD_EVENT_RUMBLE_STOP, NULL); - /* Always disable FF & SM when entering menu. */ - input_state_get_ptr()->flags &= ~INP_FLAG_NONBLOCKING; - runloop_st->flags &= ~RUNLOOP_FLAG_FASTMOTION; - runloop_st->flags &= ~RUNLOOP_FLAG_SLOWMOTION; -#if defined(HAVE_GFX_WIDGETS) - video_state_get_ptr()->flags &= ~VIDEO_FLAG_WIDGETS_FAST_FORWARD; - video_state_get_ptr()->flags &= ~VIDEO_FLAG_WIDGETS_REWINDING; -#endif - driver_set_nonblock_state(); - if (pause_libretro) - { - midi_driver_set_all_sounds_off(); + { /* If the menu pauses the game... */ #ifdef HAVE_MICROPHONE command_event(CMD_EVENT_MICROPHONE_STOP, NULL); #endif + + if (!audio_enable_menu) /* If the menu shouldn't have audio... */ + command_event(CMD_EVENT_AUDIO_STOP, NULL); } /* Override keyboard callback to redirect to menu instead. @@ -6226,9 +6224,15 @@ void menu_driver_toggle( driver_set_nonblock_state(); if (pause_libretro) - { + { /* If the menu pauses the game... */ + + if (!audio_enable_menu) /* ...and the menu doesn't have audio... */ + command_event(CMD_EVENT_AUDIO_START, NULL); + /* ...then re-enable the audio driver (which we shut off earlier) */ + #ifdef HAVE_MICROPHONE command_event(CMD_EVENT_MICROPHONE_START, NULL); + /* Start the microphone, if it was paused beforehand */ #endif } diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 14b370a43a5..6062922b0bb 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -8294,7 +8294,6 @@ static void general_write_handler(rarch_setting_t *setting) #ifdef HAVE_AUDIOMIXER if (settings->bools.audio_enable_menu) { - audio_driver_load_system_sounds(); if (settings->bools.audio_enable_menu_bgm) audio_driver_mixer_play_menu_sound_looped(AUDIO_MIXER_SYSTEM_SLOT_BGM); else @@ -15402,7 +15401,6 @@ static bool setting_append_list( general_read_handler, SD_FLAG_ADVANCED ); - MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_REINIT); END_SUB_GROUP(list, list_info, parent_group); END_GROUP(list, list_info, parent_group); @@ -16631,6 +16629,7 @@ static bool setting_append_list( SD_FLAG_CMD_APPLY_AUTO ); MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_MENU_PAUSE_LIBRETRO); + SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED); CONFIG_BOOL( list, list_info, diff --git a/retroarch.c b/retroarch.c index 533b70131bf..7f178064071 100644 --- a/retroarch.c +++ b/retroarch.c @@ -2870,12 +2870,6 @@ bool command_event(enum event_command cmd, void *data) command_event_reinit( data ? *(const int*)data : DRIVERS_CMD_ALL); -#if defined(HAVE_AUDIOMIXER) && defined(HAVE_MENU) - /* Menu sounds require audio reinit */ - if (settings->bools.audio_enable_menu) - command_event(CMD_EVENT_AUDIO_REINIT, NULL); -#endif - /* Recalibrate frame delay target */ if (settings->bools.video_frame_delay_auto) video_st->frame_delay_target = 0; @@ -2963,6 +2957,7 @@ bool command_event(enum event_command cmd, void *data) #endif break; case CMD_EVENT_AUDIO_STOP: + midi_driver_set_all_sounds_off(); #if defined(HAVE_AUDIOMIXER) && defined(HAVE_MENU) if ( settings->bools.audio_enable_menu && menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE) @@ -3622,7 +3617,6 @@ bool command_event(enum event_command cmd, void *data) runloop_st->flags |= RUNLOOP_FLAG_PAUSED; else runloop_st->flags &= ~RUNLOOP_FLAG_PAUSED; - runloop_pause_checks(); } break; @@ -3643,28 +3637,42 @@ bool command_event(enum event_command cmd, void *data) runloop_pause_checks(); break; case CMD_EVENT_MENU_PAUSE_LIBRETRO: - { #ifdef HAVE_MENU + if (menu_st->flags & MENU_ST_FLAG_ALIVE) + { #ifdef HAVE_NETWORKING bool menu_pause_libretro = settings->bools.menu_pause_libretro && - netplay_driver_ctl(RARCH_NETPLAY_CTL_ALLOW_PAUSE, NULL); + netplay_driver_ctl(RARCH_NETPLAY_CTL_ALLOW_PAUSE, NULL); #else bool menu_pause_libretro = settings->bools.menu_pause_libretro; #endif if (menu_pause_libretro) - { + { /* If entering the menu pauses the game... */ + command_event(CMD_EVENT_AUDIO_STOP, NULL); #ifdef HAVE_MICROPHONE command_event(CMD_EVENT_MICROPHONE_STOP, NULL); #endif } else { + command_event(CMD_EVENT_AUDIO_START, NULL); #ifdef HAVE_MICROPHONE command_event(CMD_EVENT_MICROPHONE_START, NULL); #endif } + } + else + { +#ifdef HAVE_NETWORKING + bool menu_pause_libretro = settings->bools.menu_pause_libretro && + netplay_driver_ctl(RARCH_NETPLAY_CTL_ALLOW_PAUSE, NULL); +#else + bool menu_pause_libretro = settings->bools.menu_pause_libretro; #endif + if (menu_pause_libretro) + command_event(CMD_EVENT_AUDIO_START, NULL); } +#endif break; #ifdef HAVE_NETWORKING case CMD_EVENT_NETPLAY_PING_TOGGLE: @@ -3933,6 +3941,13 @@ bool command_event(enum event_command cmd, void *data) video_st->flags &= ~VIDEO_FLAG_IS_SWITCHING_DISPLAY_MODE; audio_st->flags &= ~AUDIO_FLAG_SUSPENDED; +#if defined(HAVE_AUDIOMIXER) && defined(HAVE_MENU) + /* Menu sounds require audio reinit. */ + if ( settings->bools.audio_enable_menu + && menu_st->flags & MENU_ST_FLAG_ALIVE) + command_event(CMD_EVENT_AUDIO_REINIT, NULL); +#endif + if (userdata && *userdata == true) video_driver_cached_frame(); } diff --git a/runloop.c b/runloop.c index 750fe232b60..27f44a1b69e 100644 --- a/runloop.c +++ b/runloop.c @@ -2674,6 +2674,9 @@ bool runloop_environment_cb(unsigned cmd, void *data) (*info)->timing.sample_rate); memcpy(av_info, *info, sizeof(*av_info)); + video_st->core_frame_time = 1000000 / + ((video_st->av_info.timing.fps > 0.0) ? + video_st->av_info.timing.fps : 60.0); command_event(CMD_EVENT_REINIT, &reinit_flags); @@ -4504,9 +4507,13 @@ static bool runloop_event_load_core(runloop_state_t *runloop_st, if (!core_verify_api_version(runloop_st)) return false; - core_init_libretro_cbs(runloop_st, &runloop_st->retro_ctx); + runloop_st->current_core.retro_get_system_av_info(&video_st->av_info); + video_st->core_frame_time = 1000000 / + ((video_st->av_info.timing.fps > 0.0) ? + video_st->av_info.timing.fps : 60.0); + return true; } @@ -4685,11 +4692,11 @@ void runloop_pause_checks(void) #ifdef HAVE_PRESENCE presence_userdata_t userdata; #endif - video_driver_state_t *video_st = video_state_get_ptr(); runloop_state_t *runloop_st = &runloop_state; bool is_paused = runloop_st->flags & RUNLOOP_FLAG_PAUSED; bool is_idle = runloop_st->flags & RUNLOOP_FLAG_IDLE; #if defined(HAVE_GFX_WIDGETS) + video_driver_state_t *video_st = video_state_get_ptr(); dispgfx_widget_t *p_dispwidget = dispwidget_get_ptr(); bool widgets_active = p_dispwidget->active; if (widgets_active) @@ -4713,8 +4720,6 @@ void runloop_pause_checks(void) if (!is_idle) video_driver_cached_frame(); - midi_driver_set_all_sounds_off(); - #ifdef HAVE_PRESENCE userdata.status = PRESENCE_GAME_PAUSED; command_event(CMD_EVENT_PRESENCE_UPDATE, &userdata); @@ -4742,9 +4747,6 @@ void runloop_pause_checks(void) /* Signal/reset paused rewind to take the initial step */ runloop_st->run_frames_and_pause = -1; - - /* Ignore frame delay target temporarily */ - video_st->frame_delay_pause = true; } struct string_list *path_get_subsystem_list(void) @@ -5399,10 +5401,6 @@ static enum runloop_state_enum runloop_check_state( return RUNLOOP_STATE_QUIT; #endif - /* When frames are generated quicker than necessary */ - if (video_st->frame_discard) - return RUNLOOP_STATE_PAUSE; - BIT256_CLEAR_ALL_PTR(¤t_bits); input_st->flags &= ~(INP_FLAG_BLOCK_LIBRETRO_INPUT