mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-17 15:17:34 +01:00
settings: Add a configuration for use_accurate_framebuffers.
This commit is contained in:
parent
3f9f047375
commit
1bbbd26563
@ -129,6 +129,7 @@ struct Values {
|
||||
// Renderer
|
||||
float resolution_factor;
|
||||
bool toggle_framelimit;
|
||||
bool use_accurate_framebuffers;
|
||||
|
||||
float bg_red;
|
||||
float bg_green;
|
||||
|
@ -161,6 +161,8 @@ TelemetrySession::TelemetrySession() {
|
||||
Settings::values.resolution_factor);
|
||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_ToggleFramelimit",
|
||||
Settings::values.toggle_framelimit);
|
||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_UseAccurateFramebuffers",
|
||||
Settings::values.use_accurate_framebuffers);
|
||||
AddField(Telemetry::FieldType::UserConfig, "System_UseDockedMode",
|
||||
Settings::values.use_docked_mode);
|
||||
}
|
||||
|
@ -84,6 +84,8 @@ void Config::ReadValues() {
|
||||
qt_config->beginGroup("Renderer");
|
||||
Settings::values.resolution_factor = qt_config->value("resolution_factor", 1.0).toFloat();
|
||||
Settings::values.toggle_framelimit = qt_config->value("toggle_framelimit", true).toBool();
|
||||
Settings::values.use_accurate_framebuffers =
|
||||
qt_config->value("use_accurate_framebuffers", false).toBool();
|
||||
|
||||
Settings::values.bg_red = qt_config->value("bg_red", 0.0).toFloat();
|
||||
Settings::values.bg_green = qt_config->value("bg_green", 0.0).toFloat();
|
||||
@ -184,6 +186,7 @@ void Config::SaveValues() {
|
||||
qt_config->beginGroup("Renderer");
|
||||
qt_config->setValue("resolution_factor", (double)Settings::values.resolution_factor);
|
||||
qt_config->setValue("toggle_framelimit", Settings::values.toggle_framelimit);
|
||||
qt_config->setValue("use_accurate_framebuffers", Settings::values.use_accurate_framebuffers);
|
||||
|
||||
// Cast to double because Qt's written float values are not human-readable
|
||||
qt_config->setValue("bg_red", (double)Settings::values.bg_red);
|
||||
|
@ -59,11 +59,13 @@ void ConfigureGraphics::setConfiguration() {
|
||||
ui->resolution_factor_combobox->setCurrentIndex(
|
||||
static_cast<int>(FromResolutionFactor(Settings::values.resolution_factor)));
|
||||
ui->toggle_framelimit->setChecked(Settings::values.toggle_framelimit);
|
||||
ui->use_accurate_framebuffers->setChecked(Settings::values.use_accurate_framebuffers);
|
||||
}
|
||||
|
||||
void ConfigureGraphics::applyConfiguration() {
|
||||
Settings::values.resolution_factor =
|
||||
ToResolutionFactor(static_cast<Resolution>(ui->resolution_factor_combobox->currentIndex()));
|
||||
Settings::values.toggle_framelimit = ui->toggle_framelimit->isChecked();
|
||||
Settings::values.use_accurate_framebuffers = ui->use_accurate_framebuffers->isChecked();
|
||||
Settings::Apply();
|
||||
}
|
||||
|
@ -29,6 +29,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="use_accurate_framebuffers">
|
||||
<property name="text">
|
||||
<string>Use accurate framebuffers (slow)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
|
@ -98,6 +98,8 @@ void Config::ReadValues() {
|
||||
(float)sdl2_config->GetReal("Renderer", "resolution_factor", 1.0);
|
||||
Settings::values.toggle_framelimit =
|
||||
sdl2_config->GetBoolean("Renderer", "toggle_framelimit", true);
|
||||
Settings::values.use_accurate_framebuffers =
|
||||
sdl2_config->GetBoolean("Renderer", "use_accurate_framebuffers", false);
|
||||
|
||||
Settings::values.bg_red = (float)sdl2_config->GetReal("Renderer", "bg_red", 0.0);
|
||||
Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 0.0);
|
||||
|
@ -102,6 +102,10 @@ resolution_factor =
|
||||
# 0 (default): Off, 1: On
|
||||
use_vsync =
|
||||
|
||||
# Whether to use accurate framebuffers
|
||||
# 0 (default): Off (fast), 1 : On (slow)
|
||||
use_accurate_framebuffers =
|
||||
|
||||
# The clear color for the renderer. What shows up on the sides of the bottom screen.
|
||||
# Must be in range of 0.0-1.0. Defaults to 1.0 for all.
|
||||
bg_red =
|
||||
|
Loading…
Reference in New Issue
Block a user