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 limiter toggle #1688

Merged
merged 2 commits into from Aug 3, 2019

Conversation

@NZJenkins
Copy link
Contributor

commented Aug 2, 2019

F9 toggles the frame limiter off and on

This makes it much faster to pass intros and click through menus on some titles such as Outrun 2006

Also stop the GUI consuming keys (it has a few commands that only do anything when emulation is not running)

@LukeUsher
Copy link
Member

left a comment

Nice work

Just one suggestion: Would it be possible to allow F9 to toggle though all possible limiter modes, rather than just cap on/off?

For example if I want to run a 30fps game at 60fps, without uncapping the framerate completely, I should be able to.

You could do this by adding an override variable, first rename g_PresentationIntervalOverride to g_PresentationIntervalRenderStateValue, to make it more descriptive, then replace your g_UnlockFramerateHack variable with a new g_PresentationIntervalOverride, which can be any available present option, or set it to an unused value such as -1 to keep existing behavior.

Available modes are:
D3DPRESENT_INTERVAL_IMMEDIATE (No Limit)
D3DPRESENT_INTERVAL_ONE (Refresh Rate)
D3DPRESENT_INTERVAL_TWO (Refresh Rate / 2)
D3DPRESENT_INTERVAL_THREE (Refresh Rate / 3)
D3DPRESENT_INTERVAL_FOUR (Refresh Rate / 4)

@gandalfthewhite19890404

This comment has been minimized.

Copy link
Contributor

commented Aug 3, 2019

What is about GUI indication of limit?

@NZJenkins

This comment has been minimized.

Copy link
Contributor Author

commented Aug 3, 2019

Curious why we'd cycle the D3DPRESENT_INTERVAL values?
I would've though we just want 3 modes of operation

  • Xbox requested frame-rate
  • Native refresh rate
  • No limiting

UI would be nice yeah, but I was just going for a quick debug key for testing

@LukeUsher

This comment has been minimized.

Copy link
Member

commented Aug 3, 2019

It’s fine as is, thanks

@LukeUsher LukeUsher merged commit 688238c into Cxbx-Reloaded:develop Aug 3, 2019

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.