citra-qt: Add an "Alternative Speed Limit" with its hotkey (#5281)

* Change "Toggle Speed Limit" to toggle between 100% and a custom value

This will change the shortcut for "Toggle Speed Limit" to make it swap between 100% and the value of "Limit Speed Percent" in the config. Old functionality is still there, but renamed to "Unthrottle".

* Complete reimplementation of the function

* Fix something that didn't get saved correctly

* Fix missing indentation

* Rewrite to keep only a single QSpinBox

* Second rewrite

* set Unthrottled to 0 in the Qspinbox

* Hotkey for Unthrottle

* minor improvements to the design

* Apply suggestions from code review

Co-authored-by: Ben <bene_thomas@web.de>

* Default slider values

* clang-format fixes

* Prevent the speed slider from changing size

...when an element in its row has variable width.

* Change "Game Speed" to "Emulation Speed"

* Apply suggestions from code review

`game_speed` to` emulation_speed`

Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>

* Fix for QSliders

* Revert "Prevent the speed slider from changing size"

This reverts commit ddaca2004484f1e024f49d2e6dc99ef5e261f64d.

* clang-format

...doesn't seem to stick to a choice

* Fix 2 for QSliders

Co-authored-by: B3n30 <benediktthomas@gmail.com>
Co-authored-by: Ben <bene_thomas@web.de>
Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
This commit is contained in:
SutandoTsukai181 2020-06-20 21:52:14 +03:00 committed by GitHub
parent 6d65319c85
commit 485d64ae73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 259 additions and 61 deletions

View file

@ -123,11 +123,14 @@ void Config::ReadValues() {
Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true);
Settings::values.resolution_factor =
static_cast<u16>(sdl2_config->GetInteger("Renderer", "resolution_factor", 1));
Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true);
Settings::values.use_disk_shader_cache =
sdl2_config->GetBoolean("Renderer", "use_disk_shader_cache", true);
Settings::values.frame_limit =
static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100));
Settings::values.use_frame_limit_alternate =
sdl2_config->GetBoolean("Renderer", "use_frame_limit_alternate", false);
Settings::values.frame_limit_alternate =
static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit_alternate", 200));
Settings::values.use_vsync_new =
static_cast<u16>(sdl2_config->GetInteger("Renderer", "use_vsync_new", 1));
Settings::values.texture_filter_name =