1
0
Fork 0

citra, citra_qt, settings.h: Add Options for Stereoscopic 3D

This commit is contained in:
N00byKing 2018-04-06 15:21:01 +02:00
parent 08b119153d
commit e4788130e5
6 changed files with 50 additions and 0 deletions

View File

@ -108,6 +108,10 @@ void Config::ReadValues() {
Settings::values.frame_limit =
static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100));
Settings::values.toggle_3d = sdl2_config->GetBoolean("Renderer", "toggle_3d", false);
Settings::values.factor_3d =
static_cast<u8>(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);

View File

@ -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

View File

@ -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<Settings::LayoutOption>(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<int>(Settings::values.layout_option));
qt_config->setValue("swap_screen", Settings::values.swap_screen);
qt_config->setValue("custom_layout", Settings::values.custom_layout);

View File

@ -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<int>(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<Settings::LayoutOption>(ui->layout_combobox->currentIndex());
Settings::values.swap_screen = ui->swap_screen->isChecked();

View File

@ -228,6 +228,33 @@
<string>Layout</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QCheckBox" name="toggle_3d">
<property name="text">
<string>Enable Stereoscopic 3D</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="factor_3d">
<property name="suffix">
<string>%</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>

View File

@ -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;