mirror of
https://github.com/PabloMK7/citra.git
synced 2024-12-29 11:06:12 +00:00
Change Monoscopic Render mode to a dropdown (#6215)
This commit is contained in:
parent
ae3d50f71f
commit
c8ff1d744a
|
@ -133,8 +133,8 @@ void Config::ReadValues() {
|
|||
Settings::values.texture_filter_name =
|
||||
sdl2_config->GetString("Renderer", "texture_filter_name", "none");
|
||||
|
||||
Settings::values.mono_render_left_eye =
|
||||
sdl2_config->GetBoolean("Renderer", "mono_render_left_eye", true);
|
||||
Settings::values.mono_render_option = static_cast<Settings::MonoRenderOption>(
|
||||
sdl2_config->GetInteger("Renderer", "mono_render_option", 0));
|
||||
Settings::values.render_3d = static_cast<Settings::StereoRenderOption>(
|
||||
sdl2_config->GetInteger("Renderer", "render_3d", 0));
|
||||
Settings::values.factor_3d =
|
||||
|
|
|
@ -167,8 +167,8 @@ render_3d =
|
|||
factor_3d =
|
||||
|
||||
# Change Default Eye to Render When in Monoscopic Mode
|
||||
# 0 (default): Right, 1: Left
|
||||
mono_render_left_eye =
|
||||
# 0 (default): Left, 1: Right
|
||||
mono_render_option =
|
||||
|
||||
# The name of the post processing shader to apply.
|
||||
# Loaded from shaders if render_3d is off or side by side.
|
||||
|
|
|
@ -483,7 +483,7 @@ void Config::ReadLayoutValues() {
|
|||
ReadGlobalSetting(Settings::values.upright_screen);
|
||||
|
||||
if (global) {
|
||||
ReadBasicSetting(Settings::values.mono_render_left_eye);
|
||||
ReadBasicSetting(Settings::values.mono_render_option);
|
||||
ReadBasicSetting(Settings::values.custom_layout);
|
||||
ReadBasicSetting(Settings::values.custom_top_left);
|
||||
ReadBasicSetting(Settings::values.custom_top_top);
|
||||
|
@ -991,7 +991,7 @@ void Config::SaveLayoutValues() {
|
|||
WriteGlobalSetting(Settings::values.upright_screen);
|
||||
|
||||
if (global) {
|
||||
WriteBasicSetting(Settings::values.mono_render_left_eye);
|
||||
WriteBasicSetting(Settings::values.mono_render_option);
|
||||
WriteBasicSetting(Settings::values.custom_layout);
|
||||
WriteBasicSetting(Settings::values.custom_top_left);
|
||||
WriteBasicSetting(Settings::values.custom_top_top);
|
||||
|
|
|
@ -54,7 +54,8 @@ void ConfigureEnhancements::SetConfiguration() {
|
|||
ui->render_3d_combobox->setCurrentIndex(
|
||||
static_cast<int>(Settings::values.render_3d.GetValue()));
|
||||
ui->factor_3d->setValue(Settings::values.factor_3d.GetValue());
|
||||
ui->mono_render_left_eye->setChecked(Settings::values.mono_render_left_eye.GetValue());
|
||||
ui->mono_rendering_eye->setCurrentIndex(
|
||||
static_cast<int>(Settings::values.mono_render_option.GetValue()));
|
||||
updateShaders(Settings::values.render_3d.GetValue());
|
||||
ui->toggle_linear_filter->setChecked(Settings::values.filter_mode.GetValue());
|
||||
int tex_filter_idx = ui->texture_filter_combobox->findText(
|
||||
|
@ -111,7 +112,8 @@ void ConfigureEnhancements::ApplyConfiguration() {
|
|||
Settings::values.render_3d =
|
||||
static_cast<Settings::StereoRenderOption>(ui->render_3d_combobox->currentIndex());
|
||||
Settings::values.factor_3d = ui->factor_3d->value();
|
||||
Settings::values.mono_render_left_eye = ui->mono_render_left_eye->isChecked();
|
||||
Settings::values.mono_render_option =
|
||||
static_cast<Settings::MonoRenderOption>(ui->mono_rendering_eye->currentIndex());
|
||||
Settings::values.pp_shader_name =
|
||||
ui->shader_combobox->itemText(ui->shader_combobox->currentIndex()).toStdString();
|
||||
Settings::values.filter_mode = ui->toggle_linear_filter->isChecked();
|
||||
|
|
|
@ -210,15 +210,26 @@
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="mono_render_left_eye">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>If false, right eye will be used. Useful if using ReShade</p></body></html></string>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Render Left Eye in Monoscopic Mode</string>
|
||||
<string>Eye to Render in Monoscopic Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="mono_rendering_eye">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Left Eye (default)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Right Eye</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -369,7 +380,7 @@
|
|||
<tabstop>texture_filter_combobox</tabstop>
|
||||
<tabstop>render_3d_combobox</tabstop>
|
||||
<tabstop>factor_3d</tabstop>
|
||||
<tabstop>mono_render_left_eye</tabstop>
|
||||
<tabstop>mono_rendering_eye</tabstop>
|
||||
<tabstop>layout_combobox</tabstop>
|
||||
<tabstop>swap_screen</tabstop>
|
||||
<tabstop>upright_screen</tabstop>
|
||||
|
|
|
@ -109,7 +109,7 @@ void LogSettings() {
|
|||
log_setting("Renderer_TextureFilterName", values.texture_filter_name.GetValue());
|
||||
log_setting("Stereoscopy_Render3d", values.render_3d.GetValue());
|
||||
log_setting("Stereoscopy_Factor3d", values.factor_3d.GetValue());
|
||||
log_setting("Stereoscopy_MonoRenderLeftEye", values.mono_render_left_eye.GetValue());
|
||||
log_setting("Stereoscopy_MonoRenderOption", values.mono_render_option.GetValue());
|
||||
log_setting("Layout_LayoutOption", values.layout_option.GetValue());
|
||||
log_setting("Layout_SwapScreen", values.swap_screen.GetValue());
|
||||
log_setting("Layout_UprightScreen", values.upright_screen.GetValue());
|
||||
|
|
|
@ -52,6 +52,10 @@ enum class StereoRenderOption : u32 {
|
|||
CardboardVR = 5
|
||||
};
|
||||
|
||||
// Which eye to render when 3d is off. 800px wide mode could be added here in the future, when
|
||||
// implemented
|
||||
enum class MonoRenderOption : u32 { LeftEye = 0, RightEye = 1 };
|
||||
|
||||
enum class AudioEmulation : u32 { HLE = 0, LLE = 1, LLEMultithreaded = 2 };
|
||||
|
||||
namespace NativeButton {
|
||||
|
@ -467,8 +471,9 @@ struct Values {
|
|||
|
||||
SwitchableSetting<StereoRenderOption> render_3d{StereoRenderOption::Off, "render_3d"};
|
||||
SwitchableSetting<u32> factor_3d{0, "factor_3d"};
|
||||
SwitchableSetting<MonoRenderOption> mono_render_option{MonoRenderOption::LeftEye,
|
||||
"mono_render_option"};
|
||||
|
||||
Setting<bool> mono_render_left_eye{false, "mono_render_left_eye"};
|
||||
Setting<s32> cardboard_screen_size{85, "cardboard_screen_size"};
|
||||
Setting<s32> cardboard_x_shift{0, "cardboard_x_shift"};
|
||||
Setting<s32> cardboard_y_shift{0, "cardboard_y_shift"};
|
||||
|
|
|
@ -149,8 +149,8 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader) {
|
|||
static_cast<int>(Settings::values.render_3d.GetValue()));
|
||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_Factor3d",
|
||||
Settings::values.factor_3d.GetValue());
|
||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_MonoRenderLeftEye",
|
||||
Settings::values.mono_render_left_eye.GetValue());
|
||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_MonoRenderOption",
|
||||
static_cast<int>(Settings::values.mono_render_option.GetValue()));
|
||||
AddField(Telemetry::FieldType::UserConfig, "System_IsNew3ds",
|
||||
Settings::values.is_new_3ds.GetValue());
|
||||
AddField(Telemetry::FieldType::UserConfig, "System_RegionValue",
|
||||
|
|
|
@ -1005,7 +1005,7 @@ void RendererOpenGL::DrawScreens(const Layout::FramebufferLayout& layout, bool f
|
|||
if (layout.top_screen_enabled) {
|
||||
if (layout.is_rotated) {
|
||||
if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::Off) {
|
||||
int eye = Settings::values.mono_render_left_eye ? 0 : 1;
|
||||
int eye = static_cast<int>(Settings::values.mono_render_option.GetValue());
|
||||
DrawSingleScreenRotated(screen_infos[eye], (float)top_screen.left,
|
||||
(float)top_screen.top, (float)top_screen.GetWidth(),
|
||||
(float)top_screen.GetHeight());
|
||||
|
@ -1037,7 +1037,7 @@ void RendererOpenGL::DrawScreens(const Layout::FramebufferLayout& layout, bool f
|
|||
}
|
||||
} else {
|
||||
if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::Off) {
|
||||
int eye = Settings::values.mono_render_left_eye.GetValue() ? 0 : 1;
|
||||
int eye = static_cast<int>(Settings::values.mono_render_option.GetValue());
|
||||
DrawSingleScreen(screen_infos[eye], (float)top_screen.left, (float)top_screen.top,
|
||||
(float)top_screen.GetWidth(), (float)top_screen.GetHeight());
|
||||
} else if (Settings::values.render_3d.GetValue() ==
|
||||
|
|
Loading…
Reference in a new issue