diff options
| author | 2015-09-02 08:56:38 -0400 | |
|---|---|---|
| committer | 2015-09-19 22:28:02 -0400 | |
| commit | 5114d756470ff70b0ce8c6f3ff98000462aaef35 (patch) | |
| tree | 8d4a5d94b02cb2499153922542af91aaf21837bb /src/citra_qt/main.cpp | |
| parent | Merge pull request #1097 from yuriks/cfg-blocks (diff) | |
| download | yuzu-5114d756470ff70b0ce8c6f3ff98000462aaef35.tar.gz yuzu-5114d756470ff70b0ce8c6f3ff98000462aaef35.tar.xz yuzu-5114d756470ff70b0ce8c6f3ff98000462aaef35.zip | |
Implement gdbstub
Diffstat (limited to 'src/citra_qt/main.cpp')
| -rw-r--r-- | src/citra_qt/main.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 01841b33c..e032cf639 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp | |||
| @@ -47,6 +47,12 @@ | |||
| 47 | 47 | ||
| 48 | #include "video_core/video_core.h" | 48 | #include "video_core/video_core.h" |
| 49 | 49 | ||
| 50 | #ifdef USE_GDBSTUB | ||
| 51 | #include "core/gdbstub/gdbstub.h" | ||
| 52 | #endif | ||
| 53 | |||
| 54 | #include "core/gdbstub/gdbstub.h" | ||
| 55 | |||
| 50 | GMainWindow::GMainWindow() : emu_thread(nullptr) | 56 | GMainWindow::GMainWindow() : emu_thread(nullptr) |
| 51 | { | 57 | { |
| 52 | Pica::g_debug_context = Pica::DebugContext::Construct(); | 58 | Pica::g_debug_context = Pica::DebugContext::Construct(); |
| @@ -137,6 +143,15 @@ GMainWindow::GMainWindow() : emu_thread(nullptr) | |||
| 137 | microProfileDialog->setVisible(settings.value("microProfileDialogVisible").toBool()); | 143 | microProfileDialog->setVisible(settings.value("microProfileDialogVisible").toBool()); |
| 138 | settings.endGroup(); | 144 | settings.endGroup(); |
| 139 | 145 | ||
| 146 | #ifdef USE_GDBSTUB | ||
| 147 | Gdbstub::SetServerPort(static_cast<u32>(Settings::values.gdbstub_port)); | ||
| 148 | #endif | ||
| 149 | |||
| 150 | ui.action_Use_Gdbstub->setChecked(Settings::values.use_gdbstub); | ||
| 151 | SetGdbstubEnabled(ui.action_Use_Gdbstub->isChecked()); | ||
| 152 | |||
| 153 | GDBStub::SetServerPort(static_cast<u32>(Settings::values.gdbstub_port)); | ||
| 154 | |||
| 140 | ui.action_Use_Hardware_Renderer->setChecked(Settings::values.use_hw_renderer); | 155 | ui.action_Use_Hardware_Renderer->setChecked(Settings::values.use_hw_renderer); |
| 141 | SetHardwareRendererEnabled(ui.action_Use_Hardware_Renderer->isChecked()); | 156 | SetHardwareRendererEnabled(ui.action_Use_Hardware_Renderer->isChecked()); |
| 142 | 157 | ||
| @@ -167,6 +182,7 @@ GMainWindow::GMainWindow() : emu_thread(nullptr) | |||
| 167 | connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); | 182 | connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); |
| 168 | connect(ui.action_Use_Hardware_Renderer, SIGNAL(triggered(bool)), this, SLOT(SetHardwareRendererEnabled(bool))); | 183 | connect(ui.action_Use_Hardware_Renderer, SIGNAL(triggered(bool)), this, SLOT(SetHardwareRendererEnabled(bool))); |
| 169 | connect(ui.action_Use_Shader_JIT, SIGNAL(triggered(bool)), this, SLOT(SetShaderJITEnabled(bool))); | 184 | connect(ui.action_Use_Shader_JIT, SIGNAL(triggered(bool)), this, SLOT(SetShaderJITEnabled(bool))); |
| 185 | connect(ui.action_Use_Gdbstub, SIGNAL(triggered(bool)), this, SLOT(SetGdbstubEnabled(bool))); | ||
| 170 | connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(ToggleWindowMode())); | 186 | connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(ToggleWindowMode())); |
| 171 | connect(ui.action_Hotkeys, SIGNAL(triggered()), this, SLOT(OnOpenHotkeysDialog())); | 187 | connect(ui.action_Hotkeys, SIGNAL(triggered()), this, SLOT(OnOpenHotkeysDialog())); |
| 172 | 188 | ||
| @@ -414,6 +430,10 @@ void GMainWindow::SetHardwareRendererEnabled(bool enabled) { | |||
| 414 | VideoCore::g_hw_renderer_enabled = enabled; | 430 | VideoCore::g_hw_renderer_enabled = enabled; |
| 415 | } | 431 | } |
| 416 | 432 | ||
| 433 | void GMainWindow::SetGdbstubEnabled(bool enabled) { | ||
| 434 | GDBStub::ToggleServer(enabled); | ||
| 435 | } | ||
| 436 | |||
| 417 | void GMainWindow::SetShaderJITEnabled(bool enabled) { | 437 | void GMainWindow::SetShaderJITEnabled(bool enabled) { |
| 418 | VideoCore::g_shader_jit_enabled = enabled; | 438 | VideoCore::g_shader_jit_enabled = enabled; |
| 419 | } | 439 | } |