diff options
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index c2efe1ee6..1ebc04af5 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -64,7 +64,6 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; | |||
| 64 | static void PrintHelp(const char* argv0) { | 64 | static void PrintHelp(const char* argv0) { |
| 65 | std::cout << "Usage: " << argv0 | 65 | std::cout << "Usage: " << argv0 |
| 66 | << " [options] <filename>\n" | 66 | << " [options] <filename>\n" |
| 67 | "-g, --gdbport=NUMBER Enable gdb stub on port NUMBER\n" | ||
| 68 | "-f, --fullscreen Start in fullscreen mode\n" | 67 | "-f, --fullscreen Start in fullscreen mode\n" |
| 69 | "-h, --help Display this help and exit\n" | 68 | "-h, --help Display this help and exit\n" |
| 70 | "-v, --version Output version information and exit\n" | 69 | "-v, --version Output version information and exit\n" |
| @@ -96,8 +95,6 @@ int main(int argc, char** argv) { | |||
| 96 | Config config; | 95 | Config config; |
| 97 | 96 | ||
| 98 | int option_index = 0; | 97 | int option_index = 0; |
| 99 | bool use_gdbstub = Settings::values.use_gdbstub; | ||
| 100 | u32 gdb_port = static_cast<u32>(Settings::values.gdbstub_port); | ||
| 101 | 98 | ||
| 102 | InitializeLogging(); | 99 | InitializeLogging(); |
| 103 | 100 | ||
| @@ -116,26 +113,17 @@ int main(int argc, char** argv) { | |||
| 116 | bool fullscreen = false; | 113 | bool fullscreen = false; |
| 117 | 114 | ||
| 118 | static struct option long_options[] = { | 115 | static struct option long_options[] = { |
| 119 | {"gdbport", required_argument, 0, 'g'}, {"fullscreen", no_argument, 0, 'f'}, | 116 | {"fullscreen", no_argument, 0, 'f'}, |
| 120 | {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'v'}, | 117 | {"help", no_argument, 0, 'h'}, |
| 121 | {"program", optional_argument, 0, 'p'}, {0, 0, 0, 0}, | 118 | {"version", no_argument, 0, 'v'}, |
| 119 | {"program", optional_argument, 0, 'p'}, | ||
| 120 | {0, 0, 0, 0}, | ||
| 122 | }; | 121 | }; |
| 123 | 122 | ||
| 124 | while (optind < argc) { | 123 | while (optind < argc) { |
| 125 | int arg = getopt_long(argc, argv, "g:fhvp::", long_options, &option_index); | 124 | int arg = getopt_long(argc, argv, "g:fhvp::", long_options, &option_index); |
| 126 | if (arg != -1) { | 125 | if (arg != -1) { |
| 127 | switch (static_cast<char>(arg)) { | 126 | switch (static_cast<char>(arg)) { |
| 128 | case 'g': | ||
| 129 | errno = 0; | ||
| 130 | gdb_port = strtoul(optarg, &endarg, 0); | ||
| 131 | use_gdbstub = true; | ||
| 132 | if (endarg == optarg) | ||
| 133 | errno = EINVAL; | ||
| 134 | if (errno != 0) { | ||
| 135 | perror("--gdbport"); | ||
| 136 | exit(1); | ||
| 137 | } | ||
| 138 | break; | ||
| 139 | case 'f': | 127 | case 'f': |
| 140 | fullscreen = true; | 128 | fullscreen = true; |
| 141 | LOG_INFO(Frontend, "Starting in fullscreen mode..."); | 129 | LOG_INFO(Frontend, "Starting in fullscreen mode..."); |
| @@ -177,8 +165,6 @@ int main(int argc, char** argv) { | |||
| 177 | InputCommon::InputSubsystem input_subsystem; | 165 | InputCommon::InputSubsystem input_subsystem; |
| 178 | 166 | ||
| 179 | // Apply the command line arguments | 167 | // Apply the command line arguments |
| 180 | Settings::values.gdbstub_port = gdb_port; | ||
| 181 | Settings::values.use_gdbstub = use_gdbstub; | ||
| 182 | Settings::Apply(system); | 168 | Settings::Apply(system); |
| 183 | 169 | ||
| 184 | std::unique_ptr<EmuWindow_SDL2> emu_window; | 170 | std::unique_ptr<EmuWindow_SDL2> emu_window; |