summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu_cmd/config.cpp')
-rw-r--r--src/yuzu_cmd/config.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index eee3f5c5e..df94ce839 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -13,7 +13,6 @@
13#include "yuzu_cmd/config.h" 13#include "yuzu_cmd/config.h"
14#include "yuzu_cmd/default_ini.h" 14#include "yuzu_cmd/default_ini.h"
15 15
16
17Config::Config() { 16Config::Config() {
18 // TODO: Don't hardcode the path; let the frontend decide where to put the config files. 17 // TODO: Don't hardcode the path; let the frontend decide where to put the config files.
19 sdl2_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "sdl2-config.ini"; 18 sdl2_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "sdl2-config.ini";
@@ -87,11 +86,8 @@ void Config::ReadValues() {
87 static_cast<Settings::CpuCore>(sdl2_config->GetInteger("Core", "cpu_core", 0)); 86 static_cast<Settings::CpuCore>(sdl2_config->GetInteger("Core", "cpu_core", 0));
88 87
89 // Renderer 88 // Renderer
90 Settings::values.use_hw_renderer = sdl2_config->GetBoolean("Renderer", "use_hw_renderer", true);
91 Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true);
92 Settings::values.resolution_factor = 89 Settings::values.resolution_factor =
93 (float)sdl2_config->GetReal("Renderer", "resolution_factor", 1.0); 90 (float)sdl2_config->GetReal("Renderer", "resolution_factor", 1.0);
94 Settings::values.use_vsync = sdl2_config->GetBoolean("Renderer", "use_vsync", false);
95 Settings::values.toggle_framelimit = 91 Settings::values.toggle_framelimit =
96 sdl2_config->GetBoolean("Renderer", "toggle_framelimit", true); 92 sdl2_config->GetBoolean("Renderer", "toggle_framelimit", true);
97 93
@@ -99,43 +95,10 @@ void Config::ReadValues() {
99 Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 0.0); 95 Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 0.0);
100 Settings::values.bg_blue = (float)sdl2_config->GetReal("Renderer", "bg_blue", 0.0); 96 Settings::values.bg_blue = (float)sdl2_config->GetReal("Renderer", "bg_blue", 0.0);
101 97
102 // Layout
103 Settings::values.layout_option =
104 static_cast<Settings::LayoutOption>(sdl2_config->GetInteger("Layout", "layout_option", 0));
105 Settings::values.swap_screen = sdl2_config->GetBoolean("Layout", "swap_screen", false);
106 Settings::values.custom_layout = sdl2_config->GetBoolean("Layout", "custom_layout", false);
107 Settings::values.custom_top_left =
108 static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_top_left", 0));
109 Settings::values.custom_top_top =
110 static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_top_top", 0));
111 Settings::values.custom_top_right =
112 static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_top_right", 400));
113 Settings::values.custom_top_bottom =
114 static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_top_bottom", 240));
115 Settings::values.custom_bottom_left =
116 static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_left", 40));
117 Settings::values.custom_bottom_top =
118 static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_top", 240));
119 Settings::values.custom_bottom_right =
120 static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_right", 360));
121 Settings::values.custom_bottom_bottom =
122 static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_bottom", 480));
123
124 // Audio
125 Settings::values.sink_id = sdl2_config->Get("Audio", "output_engine", "auto");
126 Settings::values.enable_audio_stretching =
127 sdl2_config->GetBoolean("Audio", "enable_audio_stretching", true);
128 Settings::values.audio_device_id = sdl2_config->Get("Audio", "output_device", "auto");
129
130 // Data Storage 98 // Data Storage
131 Settings::values.use_virtual_sd = 99 Settings::values.use_virtual_sd =
132 sdl2_config->GetBoolean("Data Storage", "use_virtual_sd", true); 100 sdl2_config->GetBoolean("Data Storage", "use_virtual_sd", true);
133 101
134 // System
135 Settings::values.is_new_3ds = sdl2_config->GetBoolean("System", "is_new_3ds", false);
136 Settings::values.region_value =
137 sdl2_config->GetInteger("System", "region_value", Settings::REGION_VALUE_AUTO_SELECT);
138
139 // Miscellaneous 102 // Miscellaneous
140 Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Info"); 103 Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Info");
141 104
@@ -143,16 +106,6 @@ void Config::ReadValues() {
143 Settings::values.use_gdbstub = sdl2_config->GetBoolean("Debugging", "use_gdbstub", false); 106 Settings::values.use_gdbstub = sdl2_config->GetBoolean("Debugging", "use_gdbstub", false);
144 Settings::values.gdbstub_port = 107 Settings::values.gdbstub_port =
145 static_cast<u16>(sdl2_config->GetInteger("Debugging", "gdbstub_port", 24689)); 108 static_cast<u16>(sdl2_config->GetInteger("Debugging", "gdbstub_port", 24689));
146
147 // Web Service
148 Settings::values.enable_telemetry =
149 sdl2_config->GetBoolean("WebService", "enable_telemetry", true);
150 Settings::values.telemetry_endpoint_url = sdl2_config->Get(
151 "WebService", "telemetry_endpoint_url", "https://services.citra-emu.org/api/telemetry");
152 Settings::values.verify_endpoint_url = sdl2_config->Get(
153 "WebService", "verify_endpoint_url", "https://services.citra-emu.org/api/profile");
154 Settings::values.citra_username = sdl2_config->Get("WebService", "citra_username", "");
155 Settings::values.citra_token = sdl2_config->Get("WebService", "citra_token", "");
156} 109}
157 110
158void Config::Reload() { 111void Config::Reload() {