citra-qt: Add customizable speed limit target (#3353)
citra-qt: Add customizable speed limit target * Update SDL config for the new frame_limit option * Made max lag time a function of target speed percent. * Added a checkbox to enable/disable frame limiter * UI: Prevent frame_limit from under/overflowing * UI: Hide target speed percent when frame limiter is off * Disable frame limit spin box when framelimit isn't enabled
This commit is contained in:
parent
33b0b5163f
commit
b002511df0
12 changed files with 155 additions and 96 deletions
|
@ -77,7 +77,8 @@ void Config::ReadValues() {
|
|||
Settings::values.use_shader_jit = qt_config->value("use_shader_jit", true).toBool();
|
||||
Settings::values.resolution_factor = qt_config->value("resolution_factor", 1.0).toFloat();
|
||||
Settings::values.use_vsync = qt_config->value("use_vsync", false).toBool();
|
||||
Settings::values.toggle_framelimit = qt_config->value("toggle_framelimit", true).toBool();
|
||||
Settings::values.use_frame_limit = qt_config->value("use_frame_limit", true).toBool();
|
||||
Settings::values.frame_limit = qt_config->value("frame_limit", 100).toInt();
|
||||
|
||||
Settings::values.bg_red = qt_config->value("bg_red", 0.0).toFloat();
|
||||
Settings::values.bg_green = qt_config->value("bg_green", 0.0).toFloat();
|
||||
|
@ -241,7 +242,8 @@ void Config::SaveValues() {
|
|||
qt_config->setValue("use_shader_jit", Settings::values.use_shader_jit);
|
||||
qt_config->setValue("resolution_factor", (double)Settings::values.resolution_factor);
|
||||
qt_config->setValue("use_vsync", Settings::values.use_vsync);
|
||||
qt_config->setValue("toggle_framelimit", Settings::values.toggle_framelimit);
|
||||
qt_config->setValue("use_frame_limit", Settings::values.use_frame_limit);
|
||||
qt_config->setValue("frame_limit", Settings::values.frame_limit);
|
||||
|
||||
// Cast to double because Qt's written float values are not human-readable
|
||||
qt_config->setValue("bg_red", (double)Settings::values.bg_red);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue