diff --git a/src/citra/config.cpp b/src/citra/config.cpp index b4e3a2ce9..29ebc39da 100644 --- a/src/citra/config.cpp +++ b/src/citra/config.cpp @@ -108,6 +108,10 @@ void Config::ReadValues() { Settings::values.frame_limit = static_cast(sdl2_config->GetInteger("Renderer", "frame_limit", 100)); + Settings::values.toggle_3d = sdl2_config->GetBoolean("Renderer", "toggle_3d", false); + Settings::values.factor_3d = + static_cast(sdl2_config->GetInteger("Renderer", "factor_3d", 0)); + 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); Settings::values.bg_blue = (float)sdl2_config->GetReal("Renderer", "bg_blue", 0.0); diff --git a/src/citra/default_ini.h b/src/citra/default_ini.h index 7179d6f94..9b2565962 100644 --- a/src/citra/default_ini.h +++ b/src/citra/default_ini.h @@ -116,6 +116,14 @@ bg_red = bg_blue = bg_green = +# Toggles Stereoscopic 3D +# 0 (default): Off, 1: On +toggle_3d = + +# Change 3D Intensity +# 0 - 100: Intensity. 0 (default) +factor_3d = + [Layout] # Layout for the screen inside the render window. # 0 (default): Default Top Bottom Screen, 1: Single Screen Only, 2: Large Screen Small Screen, 3: Side by Side diff --git a/src/citra_qt/configuration/config.cpp b/src/citra_qt/configuration/config.cpp index bdb296659..0e94a3d77 100644 --- a/src/citra_qt/configuration/config.cpp +++ b/src/citra_qt/configuration/config.cpp @@ -100,6 +100,8 @@ void Config::ReadValues() { qt_config->endGroup(); qt_config->beginGroup("Layout"); + Settings::values.toggle_3d = qt_config->value("toggle_3d", false).toBool(); + Settings::values.factor_3d = qt_config->value("factor_3d", 0).toInt(); Settings::values.layout_option = static_cast(qt_config->value("layout_option").toInt()); Settings::values.swap_screen = qt_config->value("swap_screen", false).toBool(); @@ -292,6 +294,8 @@ void Config::SaveValues() { qt_config->endGroup(); qt_config->beginGroup("Layout"); + qt_config->setValue("toggle_3d", Settings::values.toggle_3d); + qt_config->setValue("factor_3d", Settings::values.factor_3d); qt_config->setValue("layout_option", static_cast(Settings::values.layout_option)); qt_config->setValue("swap_screen", Settings::values.swap_screen); qt_config->setValue("custom_layout", Settings::values.custom_layout); diff --git a/src/citra_qt/configuration/configure_graphics.cpp b/src/citra_qt/configuration/configure_graphics.cpp index f167d3742..7868702f5 100644 --- a/src/citra_qt/configuration/configure_graphics.cpp +++ b/src/citra_qt/configuration/configure_graphics.cpp @@ -40,6 +40,8 @@ void ConfigureGraphics::setConfiguration() { ui->toggle_vsync->setChecked(Settings::values.use_vsync); ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit); ui->frame_limit->setValue(Settings::values.frame_limit); + ui->factor_3d->setValue(Settings::values.factor_3d); + ui->toggle_3d->setChecked(Settings::values.toggle_3d); ui->layout_combobox->setCurrentIndex(static_cast(Settings::values.layout_option)); ui->swap_screen->setChecked(Settings::values.swap_screen); } @@ -55,6 +57,8 @@ void ConfigureGraphics::applyConfiguration() { Settings::values.use_vsync = ui->toggle_vsync->isChecked(); Settings::values.use_frame_limit = ui->toggle_frame_limit->isChecked(); Settings::values.frame_limit = ui->frame_limit->value(); + Settings::values.factor_3d = ui->factor_3d->value(); + Settings::values.toggle_3d = ui->toggle_3d->isChecked(); Settings::values.layout_option = static_cast(ui->layout_combobox->currentIndex()); Settings::values.swap_screen = ui->swap_screen->isChecked(); diff --git a/src/citra_qt/configuration/configure_graphics.ui b/src/citra_qt/configuration/configure_graphics.ui index 330a5fb82..9ba4bd0b1 100644 --- a/src/citra_qt/configuration/configure_graphics.ui +++ b/src/citra_qt/configuration/configure_graphics.ui @@ -228,6 +228,33 @@ Layout + + + + + + Enable Stereoscopic 3D + + + + + + + % + + + 0 + + + 100 + + + 0 + + + + + diff --git a/src/core/settings.h b/src/core/settings.h index b57a1cbed..d715388c8 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -132,6 +132,9 @@ struct Values { float bg_green; float bg_blue; + bool toggle_3d; + u8 factor_3d; + // Audio std::string sink_id; bool enable_audio_stretching;