aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/qt_sdl/EmuSettingsDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/qt_sdl/EmuSettingsDialog.cpp')
-rw-r--r--src/frontend/qt_sdl/EmuSettingsDialog.cpp64
1 files changed, 62 insertions, 2 deletions
diff --git a/src/frontend/qt_sdl/EmuSettingsDialog.cpp b/src/frontend/qt_sdl/EmuSettingsDialog.cpp
index 0bdbb5c..571f36a 100644
--- a/src/frontend/qt_sdl/EmuSettingsDialog.cpp
+++ b/src/frontend/qt_sdl/EmuSettingsDialog.cpp
@@ -89,7 +89,22 @@ EmuSettingsDialog::EmuSettingsDialog(QWidget* parent) : QDialog(parent), ui(new
ui->spnJITMaximumBlockSize->setDisabled(true);
#endif
+#ifdef GDBSTUB_ENABLED
+ ui->cbGdbEnabled->setChecked(Config::GdbEnabled);
+ ui->intGdbPortA7->setValue(Config::GdbPortARM7);
+ ui->intGdbPortA9->setValue(Config::GdbPortARM9);
+ ui->cbGdbBOSA7->setChecked(Config::GdbARM7BreakOnStartup);
+ ui->cbGdbBOSA9->setChecked(Config::GdbARM9BreakOnStartup);
+#else
+ ui->cbGdbEnabled->setDisabled(true);
+ ui->intGdbPortA7->setDisabled(true);
+ ui->intGdbPortA9->setDisabled(true);
+ ui->cbGdbBOSA7->setDisabled(true);
+ ui->cbGdbBOSA9->setDisabled(true);
+#endif
+
on_chkEnableJIT_toggled();
+ on_cbGdbEnabled_toggled();
on_chkExternalBIOS_toggled();
const int imgsizes[] = {256, 512, 1024, 2048, 4096, 0};
@@ -223,6 +238,12 @@ void EmuSettingsDialog::done(int r)
bool dsiSDFolderSync = ui->cbDSiSDFolder->isChecked();
std::string dsiSDFolderPath = ui->txtDSiSDFolder->text().toStdString();
+ bool gdbEnabled = ui->cbGdbEnabled->isChecked();
+ int gdbPortA7 = ui->intGdbPortA7->value();
+ int gdbPortA9 = ui->intGdbPortA9->value();
+ bool gdbBOSA7 = ui->cbGdbBOSA7->isChecked();
+ bool gdbBOSA9 = ui->cbGdbBOSA9->isChecked();
+
if (consoleType != Config::ConsoleType
|| directBoot != Config::DirectBoot
#ifdef JIT_ENABLED
@@ -232,6 +253,13 @@ void EmuSettingsDialog::done(int r)
|| jitLiteralOptimisations != Config::JIT_LiteralOptimisations
|| jitFastMemory != Config::JIT_FastMemory
#endif
+#ifdef GDBSTUB_ENABLED
+ || gdbEnabled != Config::GdbEnabled
+ || gdbPortA7 != Config::GdbPortARM7
+ || gdbPortA9 != Config::GdbPortARM9
+ || gdbBOSA7 != Config::GdbARM7BreakOnStartup
+ || gdbBOSA9 != Config::GdbARM9BreakOnStartup
+#endif
|| externalBiosEnable != Config::ExternalBIOSEnable
|| bios9Path != Config::BIOS9Path
|| bios7Path != Config::BIOS7Path
@@ -285,13 +313,20 @@ void EmuSettingsDialog::done(int r)
Config::DSiSDFolderSync = dsiSDFolderSync;
Config::DSiSDFolderPath = dsiSDFolderPath;
- #ifdef JIT_ENABLED
+#ifdef JIT_ENABLED
Config::JIT_Enable = jitEnable;
Config::JIT_MaxBlockSize = jitMaxBlockSize;
Config::JIT_BranchOptimisations = jitBranchOptimisations;
Config::JIT_LiteralOptimisations = jitLiteralOptimisations;
Config::JIT_FastMemory = jitFastMemory;
- #endif
+#endif
+#ifdef GDBSTUB_ENABLED
+ Config::GdbEnabled = gdbEnabled;
+ Config::GdbPortARM7 = gdbPortA7;
+ Config::GdbPortARM9 = gdbPortA9;
+ Config::GdbARM7BreakOnStartup = gdbBOSA7;
+ Config::GdbARM9BreakOnStartup = gdbBOSA9;
+#endif
Config::ConsoleType = consoleType;
Config::DirectBoot = directBoot;
@@ -506,6 +541,31 @@ void EmuSettingsDialog::on_chkEnableJIT_toggled()
ui->chkJITFastMemory->setDisabled(disabled);
#endif
ui->spnJITMaximumBlockSize->setDisabled(disabled);
+
+ on_cbGdbEnabled_toggled();
+}
+
+void EmuSettingsDialog::on_cbGdbEnabled_toggled()
+{
+#ifdef GDBSTUB_ENABLED
+ bool disabled = !ui->cbGdbEnabled->isChecked();
+ bool jitenable = ui->chkEnableJIT->isChecked();
+
+ if (jitenable && !disabled) {
+ ui->cbGdbEnabled->setChecked(false);
+ disabled = true;
+ }
+#else
+ bool disabled = true;
+ bool jitenable = true;
+ ui->cbGdbEnabled->setChecked(false);
+#endif
+
+ ui->cbGdbEnabled->setDisabled(jitenable);
+ ui->intGdbPortA7->setDisabled(disabled);
+ ui->intGdbPortA9->setDisabled(disabled);
+ ui->cbGdbBOSA7->setDisabled(disabled);
+ ui->cbGdbBOSA9->setDisabled(disabled);
}
void EmuSettingsDialog::on_chkExternalBIOS_toggled()