summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/config.cpp1
-rw-r--r--src/yuzu_cmd/yuzu.cpp19
2 files changed, 12 insertions, 8 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index 9d934e220..2470f4640 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -138,6 +138,7 @@ void Config::ReadValues() {
138 Settings::values.use_gdbstub = sdl2_config->GetBoolean("Debugging", "use_gdbstub", false); 138 Settings::values.use_gdbstub = sdl2_config->GetBoolean("Debugging", "use_gdbstub", false);
139 Settings::values.gdbstub_port = 139 Settings::values.gdbstub_port =
140 static_cast<u16>(sdl2_config->GetInteger("Debugging", "gdbstub_port", 24689)); 140 static_cast<u16>(sdl2_config->GetInteger("Debugging", "gdbstub_port", 24689));
141 Settings::values.program_args = sdl2_config->Get("Debugging", "program_args", "");
141 142
142 // Web Service 143 // Web Service
143 Settings::values.enable_telemetry = 144 Settings::values.enable_telemetry =
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 1d951ca3f..27aba95f6 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -56,9 +56,10 @@ static void PrintHelp(const char* argv0) {
56 std::cout << "Usage: " << argv0 56 std::cout << "Usage: " << argv0
57 << " [options] <filename>\n" 57 << " [options] <filename>\n"
58 "-g, --gdbport=NUMBER Enable gdb stub on port NUMBER\n" 58 "-g, --gdbport=NUMBER Enable gdb stub on port NUMBER\n"
59 "-f, --fullscreen Start in fullscreen mode\n" 59 "-f, --fullscreen Start in fullscreen mode\n"
60 "-h, --help Display this help and exit\n" 60 "-h, --help Display this help and exit\n"
61 "-v, --version Output version information and exit\n"; 61 "-v, --version Output version information and exit\n"
62 "-p, --program Pass following string as arguments to executable\n";
62} 63}
63 64
64static void PrintVersion() { 65static void PrintVersion() {
@@ -103,15 +104,13 @@ int main(int argc, char** argv) {
103 bool fullscreen = false; 104 bool fullscreen = false;
104 105
105 static struct option long_options[] = { 106 static struct option long_options[] = {
106 {"gdbport", required_argument, 0, 'g'}, 107 {"gdbport", required_argument, 0, 'g'}, {"fullscreen", no_argument, 0, 'f'},
107 {"fullscreen", no_argument, 0, 'f'}, 108 {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'v'},
108 {"help", no_argument, 0, 'h'}, 109 {"program", optional_argument, 0, 'p'}, {0, 0, 0, 0},
109 {"version", no_argument, 0, 'v'},
110 {0, 0, 0, 0},
111 }; 110 };
112 111
113 while (optind < argc) { 112 while (optind < argc) {
114 char arg = getopt_long(argc, argv, "g:fhv", long_options, &option_index); 113 char arg = getopt_long(argc, argv, "g:fhvp::", long_options, &option_index);
115 if (arg != -1) { 114 if (arg != -1) {
116 switch (arg) { 115 switch (arg) {
117 case 'g': 116 case 'g':
@@ -135,6 +134,10 @@ int main(int argc, char** argv) {
135 case 'v': 134 case 'v':
136 PrintVersion(); 135 PrintVersion();
137 return 0; 136 return 0;
137 case 'p':
138 Settings::values.program_args = argv[optind];
139 ++optind;
140 break;
138 } 141 }
139 } else { 142 } else {
140#ifdef _WIN32 143#ifdef _WIN32