From edb6d7c97e58d54878d17959ed05263e5723301e Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 4 Feb 2020 15:22:56 +0900 Subject: [PATCH] Qt: Add debug settings to menu --- src/duckstation-qt/mainwindow.cpp | 14 ++++++ src/duckstation-qt/mainwindow.ui | 73 +++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 20315ccc5..1b6802e5a 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -6,6 +6,7 @@ #include "qthostinterface.h" #include "qtsettingsinterface.h" #include "settingsdialog.h" +#include "settingwidgetbinder.h" #include #include #include @@ -359,6 +360,19 @@ void MainWindow::connectSignals() m_ui.statusBar->showMessage(QString::fromStdString(entry->path)); populateLoadSaveStateMenus(QString::fromStdString(entry->code)); }); + + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowVRAM, "Debug/ShowVRAM"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugDumpCPUtoVRAMCopies, + "Debug/DumpCPUToVRAMCopies"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugDumpVRAMtoCPUCopies, + "Debug/DumpVRAMToCPUCopies"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowGPUState, "Debug/ShowGPUState"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowCDROMState, + "Debug/ShowCDROMState"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowSPUState, "Debug/ShowSPUState"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowTimersState, + "Debug/ShowTimersState"); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDebugShowMDECState, "Debug/ShowMDECState"); } SettingsDialog* MainWindow::getSettingsDialog() diff --git a/src/duckstation-qt/mainwindow.ui b/src/duckstation-qt/mainwindow.ui index e9ca9abb3..3bdcda870 100644 --- a/src/duckstation-qt/mainwindow.ui +++ b/src/duckstation-qt/mainwindow.ui @@ -123,6 +123,15 @@ + + + + + + + + + @@ -388,6 +397,70 @@ Global State + + + true + + + Show VRAM + + + + + true + + + Dump CPU to VRAM Copies + + + + + true + + + Dump VRAM to CPU Copies + + + + + true + + + Show GPU State + + + + + true + + + Show CDROM State + + + + + true + + + Show SPU State + + + + + true + + + Show Timers State + + + + + true + + + Show MDEC State + +