summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/config.cpp6
-rw-r--r--src/yuzu_cmd/default_ini.h22
-rw-r--r--src/yuzu_cmd/yuzu.cpp20
3 files changed, 34 insertions, 14 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index cea1a5e62..9bf26717f 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -105,6 +105,11 @@ void Config::ReadValues() {
105 Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 0.0); 105 Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 0.0);
106 Settings::values.bg_blue = (float)sdl2_config->GetReal("Renderer", "bg_blue", 0.0); 106 Settings::values.bg_blue = (float)sdl2_config->GetReal("Renderer", "bg_blue", 0.0);
107 107
108 // Audio
109 Settings::values.sink_id = sdl2_config->Get("Audio", "output_engine", "auto");
110 Settings::values.audio_device_id = sdl2_config->Get("Audio", "output_device", "auto");
111 Settings::values.volume = sdl2_config->GetReal("Audio", "volume", 1);
112
108 // Data Storage 113 // Data Storage
109 Settings::values.use_virtual_sd = 114 Settings::values.use_virtual_sd =
110 sdl2_config->GetBoolean("Data Storage", "use_virtual_sd", true); 115 sdl2_config->GetBoolean("Data Storage", "use_virtual_sd", true);
@@ -114,6 +119,7 @@ void Config::ReadValues() {
114 119
115 // Miscellaneous 120 // Miscellaneous
116 Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Trace"); 121 Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Trace");
122 Settings::values.use_dev_keys = sdl2_config->GetBoolean("Miscellaneous", "use_dev_keys", false);
117 123
118 // Debugging 124 // Debugging
119 Settings::values.use_gdbstub = sdl2_config->GetBoolean("Debugging", "use_gdbstub", false); 125 Settings::values.use_gdbstub = sdl2_config->GetBoolean("Debugging", "use_gdbstub", false);
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h
index 567f23417..9a935a0d5 100644
--- a/src/yuzu_cmd/default_ini.h
+++ b/src/yuzu_cmd/default_ini.h
@@ -143,19 +143,17 @@ swap_screen =
143 143
144[Audio] 144[Audio]
145# Which audio output engine to use. 145# Which audio output engine to use.
146# auto (default): Auto-select, null: No audio output, sdl2: SDL2 (if available) 146# auto (default): Auto-select, null: No audio output, cubeb: Cubeb audio engine (if available)
147output_engine = 147output_engine =
148 148
149# Whether or not to enable the audio-stretching post-processing effect.
150# This effect adjusts audio speed to match emulation speed and helps prevent audio stutter,
151# at the cost of increasing audio latency.
152# 0: No, 1 (default): Yes
153enable_audio_stretching =
154
155# Which audio device to use. 149# Which audio device to use.
156# auto (default): Auto-select 150# auto (default): Auto-select
157output_device = 151output_device =
158 152
153# Output volume.
154# 1.0 (default): 100%, 0.0; mute
155volume =
156
159[Data Storage] 157[Data Storage]
160# Whether to create a virtual SD card. 158# Whether to create a virtual SD card.
161# 1 (default): Yes, 0: No 159# 1 (default): Yes, 0: No
@@ -166,6 +164,16 @@ use_virtual_sd =
166# 1: Yes, 0 (default): No 164# 1: Yes, 0 (default): No
167use_docked_mode = 165use_docked_mode =
168 166
167# Sets the account username, max length is 32 characters
168# yuzu (default)
169username =
170
171# Sets the systems language index
172# 0: Japanese, 1: English (default), 2: French, 3: German, 4: Italian, 5: Spanish, 6: Chinese,
173# 7: Korean, 8: Dutch, 9: Portuguese, 10: Russian, 11: Taiwanese, 12: British English, 13: Canadian French,
174# 14: Latin American Spanish, 15: Simplified Chinese, 16: Traditional Chinese
175language_index =
176
169# The system region that yuzu will use during emulation 177# The system region that yuzu will use during emulation
170# -1: Auto-select (default), 0: Japan, 1: USA, 2: Europe, 3: Australia, 4: China, 5: Korea, 6: Taiwan 178# -1: Auto-select (default), 0: Japan, 1: USA, 2: Europe, 3: Australia, 4: China, 5: Korea, 6: Taiwan
171region_value = 179region_value =
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index b5392c499..d637dbd0c 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -23,6 +23,7 @@
23#include "yuzu_cmd/emu_window/emu_window_sdl2.h" 23#include "yuzu_cmd/emu_window/emu_window_sdl2.h"
24 24
25#include <getopt.h> 25#include <getopt.h>
26#include "core/crypto/key_manager.h"
26#ifndef _MSC_VER 27#ifndef _MSC_VER
27#include <unistd.h> 28#include <unistd.h>
28#endif 29#endif
@@ -71,6 +72,7 @@ static void InitializeLogging() {
71/// Application entry point 72/// Application entry point
72int main(int argc, char** argv) { 73int main(int argc, char** argv) {
73 Config config; 74 Config config;
75
74 int option_index = 0; 76 int option_index = 0;
75 bool use_gdbstub = Settings::values.use_gdbstub; 77 bool use_gdbstub = Settings::values.use_gdbstub;
76 u32 gdb_port = static_cast<u32>(Settings::values.gdbstub_port); 78 u32 gdb_port = static_cast<u32>(Settings::values.gdbstub_port);
@@ -162,7 +164,7 @@ int main(int argc, char** argv) {
162 164
163 SCOPE_EXIT({ system.Shutdown(); }); 165 SCOPE_EXIT({ system.Shutdown(); });
164 166
165 const Core::System::ResultStatus load_result{system.Load(emu_window.get(), filepath)}; 167 const Core::System::ResultStatus load_result{system.Load(*emu_window, filepath)};
166 168
167 switch (load_result) { 169 switch (load_result) {
168 case Core::System::ResultStatus::ErrorGetLoader: 170 case Core::System::ResultStatus::ErrorGetLoader:
@@ -171,11 +173,15 @@ int main(int argc, char** argv) {
171 case Core::System::ResultStatus::ErrorLoader: 173 case Core::System::ResultStatus::ErrorLoader:
172 LOG_CRITICAL(Frontend, "Failed to load ROM!"); 174 LOG_CRITICAL(Frontend, "Failed to load ROM!");
173 return -1; 175 return -1;
174 case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: 176 case Core::System::ResultStatus::ErrorLoader_ErrorMissingKeys:
175 LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before " 177 LOG_CRITICAL(Frontend, "The game you are trying to load is encrypted and the keys required "
176 "being used with yuzu. \n\n For more information on dumping and " 178 "could not be found. Please refer to the yuzu wiki for help");
177 "decrypting games, please refer to: " 179 return -1;
178 "https://yuzu-emu.org/wiki/dumping-game-cartridges/"); 180 case Core::System::ResultStatus::ErrorLoader_ErrorDecrypting:
181 LOG_CRITICAL(Frontend, "The game you are trying to load is encrypted and there was a "
182 "general error while decrypting. This could mean that the keys are "
183 "incorrect, game is invalid or game uses an unsupported method of "
184 "crypto. Please double-check your keys");
179 return -1; 185 return -1;
180 case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: 186 case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat:
181 LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported."); 187 LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported.");
@@ -187,7 +193,7 @@ int main(int argc, char** argv) {
187 LOG_CRITICAL(Frontend, "Failed to determine system mode!"); 193 LOG_CRITICAL(Frontend, "Failed to determine system mode!");
188 return -1; 194 return -1;
189 case Core::System::ResultStatus::ErrorVideoCore: 195 case Core::System::ResultStatus::ErrorVideoCore:
190 LOG_CRITICAL(Frontend, "VideoCore not initialized"); 196 LOG_CRITICAL(Frontend, "Failed to initialize VideoCore!");
191 return -1; 197 return -1;
192 case Core::System::ResultStatus::Success: 198 case Core::System::ResultStatus::Success:
193 break; // Expected case 199 break; // Expected case