Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame limiting improvements #15391

Merged
merged 1 commit into from
Jun 18, 2023
Merged

Conversation

sonninnos
Copy link
Collaborator

Description

This PR retries a few reverted changes, and some more (quite a lot for a single PR though, but they are related):

  • Corrected fast-forward frame skipping to use display frame time as target instead of core frame time
  • Extended fast-forward frame skipping to also be used in paused state (which renders at unlimited speed now without vsync)
  • Adjusted menu navigation timings
  • Don't do double frame skipping with Vulkan on fast-forward (WIN32 + fullscreen + vsync on)
  • Allow disabling menu vsync forcing with existing "Throttle Menu Framerate" option (still on by default)
  • Stop fast-forward and slow-motion on menu toggle
  • Don't stop/start audio on menu toggle
  • Moved midi_driver_set_all_sounds_off() to menu and pause toggle
  • Don't pause menu sounds if paused manually
  • Relocated audio reinit for menu sounds to always after reinit (find out later why the same reinit is not enough)
  • Ensure menu sounds are loaded on menu sound toggle
  • Cleanups

The crucial part is the new frame discarding system to limit paused menu and and paused state rendering to display refresh rate without any sleep shenanigans. Even if menu is rendered uncapped without vsync, only visible frames are shown, and menu navigation delays stay the same.

@LibretroAdmin LibretroAdmin merged commit c723710 into libretro:master Jun 18, 2023
@sonninnos sonninnos deleted the frametime-limit branch June 18, 2023 17:07
@LibretroAdmin
Copy link
Contributor

Regression on macOS (on a Macbook Pro M1 2020) - screen refresh rate seems to be stuck at 56Hz/56fps, can never reach 60fps/60Hz with this. Will revert for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants