summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarley <tfarleygithub@gmail.com>2016-04-17 00:51:49 +0200
committertfarley <tfarleygithub@gmail.com>2016-04-21 23:27:48 +0200
commite46d086189908ce9b9d7d68e3e4453396e48c7cc (patch)
tree69a8c70d12d088fa59f49891c91de6f16a1d4ca9
parentUpdate to ext-boost with interval_map (diff)
downloadyuzu-e46d086189908ce9b9d7d68e3e4453396e48c7cc.tar
yuzu-e46d086189908ce9b9d7d68e3e4453396e48c7cc.tar.gz
yuzu-e46d086189908ce9b9d7d68e3e4453396e48c7cc.tar.bz2
yuzu-e46d086189908ce9b9d7d68e3e4453396e48c7cc.tar.lz
yuzu-e46d086189908ce9b9d7d68e3e4453396e48c7cc.tar.xz
yuzu-e46d086189908ce9b9d7d68e3e4453396e48c7cc.tar.zst
yuzu-e46d086189908ce9b9d7d68e3e4453396e48c7cc.zip
-rw-r--r--src/citra/config.cpp1
-rw-r--r--src/citra/default_ini.h4
-rw-r--r--src/citra_qt/config.cpp2
-rw-r--r--src/citra_qt/configure_general.cpp2
-rw-r--r--src/citra_qt/configure_general.ui7
-rw-r--r--src/core/settings.cpp2
-rw-r--r--src/core/settings.h1
-rw-r--r--src/video_core/video_core.cpp1
-rw-r--r--src/video_core/video_core.h1
9 files changed, 20 insertions, 1 deletions
diff --git a/src/citra/config.cpp b/src/citra/config.cpp
index 6b6617352..9e2ecd307 100644
--- a/src/citra/config.cpp
+++ b/src/citra/config.cpp
@@ -65,6 +65,7 @@ void Config::ReadValues() {
// Renderer
Settings::values.use_hw_renderer = sdl2_config->GetBoolean("Renderer", "use_hw_renderer", false);
Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true);
+ Settings::values.use_scaled_resolution = sdl2_config->GetBoolean("Renderer", "use_scaled_resolution", false);
Settings::values.bg_red = (float)sdl2_config->GetReal("Renderer", "bg_red", 1.0);
Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 1.0);
diff --git a/src/citra/default_ini.h b/src/citra/default_ini.h
index c9b490a00..1f1aa716b 100644
--- a/src/citra/default_ini.h
+++ b/src/citra/default_ini.h
@@ -46,6 +46,10 @@ use_hw_renderer =
# 0 : Interpreter (slow), 1 (default): JIT (fast)
use_shader_jit =
+# Whether to use native 3DS screen resolution or to scale rendering resolution to the displayed screen size.
+# 0 (default): Native, 1: Scaled
+use_scaled_resolution =
+
# 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 =
diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp
index e363be38a..7dc61fe40 100644
--- a/src/citra_qt/config.cpp
+++ b/src/citra_qt/config.cpp
@@ -45,6 +45,7 @@ void Config::ReadValues() {
qt_config->beginGroup("Renderer");
Settings::values.use_hw_renderer = qt_config->value("use_hw_renderer", false).toBool();
Settings::values.use_shader_jit = qt_config->value("use_shader_jit", true).toBool();
+ Settings::values.use_scaled_resolution = qt_config->value("use_scaled_resolution", false).toBool();
Settings::values.bg_red = qt_config->value("bg_red", 1.0).toFloat();
Settings::values.bg_green = qt_config->value("bg_green", 1.0).toFloat();
@@ -129,6 +130,7 @@ void Config::SaveValues() {
qt_config->beginGroup("Renderer");
qt_config->setValue("use_hw_renderer", Settings::values.use_hw_renderer);
qt_config->setValue("use_shader_jit", Settings::values.use_shader_jit);
+ qt_config->setValue("use_scaled_resolution", Settings::values.use_scaled_resolution);
// Cast to double because Qt's written float values are not human-readable
qt_config->setValue("bg_red", (double)Settings::values.bg_red);
diff --git a/src/citra_qt/configure_general.cpp b/src/citra_qt/configure_general.cpp
index a27d0d26c..62648e665 100644
--- a/src/citra_qt/configure_general.cpp
+++ b/src/citra_qt/configure_general.cpp
@@ -25,6 +25,7 @@ void ConfigureGeneral::setConfiguration() {
ui->region_combobox->setCurrentIndex(Settings::values.region_value);
ui->toogle_hw_renderer->setChecked(Settings::values.use_hw_renderer);
ui->toogle_shader_jit->setChecked(Settings::values.use_shader_jit);
+ ui->toogle_scaled_resolution->setChecked(Settings::values.use_scaled_resolution);
}
void ConfigureGeneral::applyConfiguration() {
@@ -33,5 +34,6 @@ void ConfigureGeneral::applyConfiguration() {
Settings::values.region_value = ui->region_combobox->currentIndex();
Settings::values.use_hw_renderer = ui->toogle_hw_renderer->isChecked();
Settings::values.use_shader_jit = ui->toogle_shader_jit->isChecked();
+ Settings::values.use_scaled_resolution = ui->toogle_scaled_resolution->isChecked();
Settings::Apply();
}
diff --git a/src/citra_qt/configure_general.ui b/src/citra_qt/configure_general.ui
index 47184c5c6..5eb309793 100644
--- a/src/citra_qt/configure_general.ui
+++ b/src/citra_qt/configure_general.ui
@@ -128,6 +128,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="toogle_scaled_resolution">
+ <property name="text">
+ <string>Enable scaled resolution</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>
diff --git a/src/core/settings.cpp b/src/core/settings.cpp
index 1aa26fbd2..eaf5c8461 100644
--- a/src/core/settings.cpp
+++ b/src/core/settings.cpp
@@ -19,7 +19,7 @@ void Apply() {
VideoCore::g_hw_renderer_enabled = values.use_hw_renderer;
VideoCore::g_shader_jit_enabled = values.use_shader_jit;
-
+ VideoCore::g_scaled_resolution_enabled = values.use_scaled_resolution;
}
} // namespace
diff --git a/src/core/settings.h b/src/core/settings.h
index 4933a516d..d620d8461 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -55,6 +55,7 @@ struct Values {
// Renderer
bool use_hw_renderer;
bool use_shader_jit;
+ bool use_scaled_resolution;
float bg_red;
float bg_green;
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp
index 256899c89..855286173 100644
--- a/src/video_core/video_core.cpp
+++ b/src/video_core/video_core.cpp
@@ -25,6 +25,7 @@ std::unique_ptr<RendererBase> g_renderer; ///< Renderer plugin
std::atomic<bool> g_hw_renderer_enabled;
std::atomic<bool> g_shader_jit_enabled;
+std::atomic<bool> g_scaled_resolution_enabled;
/// Initialize the video core
bool Init(EmuWindow* emu_window) {
diff --git a/src/video_core/video_core.h b/src/video_core/video_core.h
index bca67fb8c..30267489e 100644
--- a/src/video_core/video_core.h
+++ b/src/video_core/video_core.h
@@ -36,6 +36,7 @@ extern EmuWindow* g_emu_window; ///< Emu window
// TODO: Wrap these in a user settings struct along with any other graphics settings (often set from qt ui)
extern std::atomic<bool> g_hw_renderer_enabled;
extern std::atomic<bool> g_shader_jit_enabled;
+extern std::atomic<bool> g_scaled_resolution_enabled;
/// Start the video core
void Start();