WIP: Add TickSource-based turbo mode #747
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/turbo-mode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds a hotkey that, while held, toggles on a "turbo mode" flag that multiplies elapsed CPU TickSource ticks, which should speed up any games that use delta time between frames for physics calculations.
This is functionally distinct from the existing custom refresh rate, despite sounding similar.
Custom Refresh Rate (#238) simply allows you to increase the emulated Switch's present rate.
This PR actively changes CPU tick speeds by an arbitrary scalar to speed up gameplay deliberately.
The point of CRR (#238) is for more broad FPS cap selection, for games that aren't FPS sensitive.
Alternatively, the point of this PR is to speed up gameplay by an arbitrary factor.
Original PR archive (originally by @nico-abram)
https://web.archive.org/web/20240713135029/https://github.com/Ryujinx/Ryujinx/pull/6456
This todo is written from their perspective; not mine.
TODO:
TickSource currently stores the multiplier as a public static. Is this alright, or should it be turned into a private static and a method added?Changed to an instance field.Should the multiplier setting go in System settings? (It's where it's currently at)Moved to CPUKeyboard hotkeys cannot be assigned to a controller. Should the hotkey instead be in the input config?It's implemented as a "Hold" button. Did not see any such buttons in the avalonia UI (Only "toggle on press" buttons) so the way this was implemented might be a bit hacky, It checks IsPressed whenever (currentHotkeyState != _prevHotkeyState) and if it differs from turboMode it updates the multiplier.Need to define a default hotkey. I set it to F3 but didn't think much about it.Unbounded.Download the artifacts for this pull request:
Only for Developers
Would it be possible to add a toggle option for 'turbo mode' so that pressing the assigned hotkey once enables it, and pressing it again disables it? Holding the button is fine for short bursts, but a toggle would make it easier to use for extended periods.
ps: this will be useful in turn-based games
Please try these PRs before you suggest new things be added.
This is literally already a part of this PR. In fact its the only entry in Keyboard Hotkeys settings that has a "only while pressed" option, allowing you to choose turbo activation type.
Checkout
From your project repository, check out a new branch and test the changes.