diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra/citra.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index 045c5fe8c..3a1fbe3f7 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp | |||
| @@ -43,8 +43,10 @@ static void PrintHelp() | |||
| 43 | 43 | ||
| 44 | /// Application entry point | 44 | /// Application entry point |
| 45 | int main(int argc, char **argv) { | 45 | int main(int argc, char **argv) { |
| 46 | Config config; | ||
| 46 | int option_index = 0; | 47 | int option_index = 0; |
| 47 | u32 gdb_port = 0; | 48 | bool use_gdbstub = Settings::values.use_gdbstub; |
| 49 | u32 gdb_port = static_cast<u32>(Settings::values.gdbstub_port); | ||
| 48 | char *endarg; | 50 | char *endarg; |
| 49 | std::string boot_filename; | 51 | std::string boot_filename; |
| 50 | 52 | ||
| @@ -64,6 +66,7 @@ int main(int argc, char **argv) { | |||
| 64 | case 'g': | 66 | case 'g': |
| 65 | errno = 0; | 67 | errno = 0; |
| 66 | gdb_port = strtoul(optarg, &endarg, 0); | 68 | gdb_port = strtoul(optarg, &endarg, 0); |
| 69 | use_gdbstub = true; | ||
| 67 | if (endarg == optarg) errno = EINVAL; | 70 | if (endarg == optarg) errno = EINVAL; |
| 68 | if (errno != 0) { | 71 | if (errno != 0) { |
| 69 | perror("--gdbport"); | 72 | perror("--gdbport"); |
| @@ -88,13 +91,10 @@ int main(int argc, char **argv) { | |||
| 88 | return -1; | 91 | return -1; |
| 89 | } | 92 | } |
| 90 | 93 | ||
| 91 | Config config; | ||
| 92 | log_filter.ParseFilterString(Settings::values.log_filter); | 94 | log_filter.ParseFilterString(Settings::values.log_filter); |
| 93 | 95 | ||
| 94 | if (gdb_port != 0) { | 96 | GDBStub::ToggleServer(use_gdbstub); |
| 95 | GDBStub::ToggleServer(true); | 97 | GDBStub::SetServerPort(gdb_port); |
| 96 | GDBStub::SetServerPort(gdb_port); | ||
| 97 | } | ||
| 98 | 98 | ||
| 99 | std::unique_ptr<EmuWindow_SDL2> emu_window = std::make_unique<EmuWindow_SDL2>(); | 99 | std::unique_ptr<EmuWindow_SDL2> emu_window = std::make_unique<EmuWindow_SDL2>(); |
| 100 | 100 | ||