diff options
author | bunnei <bunneidev@gmail.com> | 2015-04-17 00:35:09 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-05-02 00:26:58 +0200 |
commit | 762c1a9ff5406afc4c6b1a3eb74dae2dc2fb0daf (patch) | |
tree | 74ac7be2a6f1b3dfd09986b598844440af9e2f8f /src/citra_qt/debugger | |
parent | Merge pull request #717 from linkmauve/useless-auto (diff) | |
download | yuzu-762c1a9ff5406afc4c6b1a3eb74dae2dc2fb0daf.tar yuzu-762c1a9ff5406afc4c6b1a3eb74dae2dc2fb0daf.tar.gz yuzu-762c1a9ff5406afc4c6b1a3eb74dae2dc2fb0daf.tar.bz2 yuzu-762c1a9ff5406afc4c6b1a3eb74dae2dc2fb0daf.tar.lz yuzu-762c1a9ff5406afc4c6b1a3eb74dae2dc2fb0daf.tar.xz yuzu-762c1a9ff5406afc4c6b1a3eb74dae2dc2fb0daf.tar.zst yuzu-762c1a9ff5406afc4c6b1a3eb74dae2dc2fb0daf.zip |
Diffstat (limited to 'src/citra_qt/debugger')
-rw-r--r-- | src/citra_qt/debugger/disassembler.cpp | 18 | ||||
-rw-r--r-- | src/citra_qt/debugger/disassembler.h | 6 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp index f620687ae..b58edafe7 100644 --- a/src/citra_qt/debugger/disassembler.cpp +++ b/src/citra_qt/debugger/disassembler.cpp @@ -4,6 +4,7 @@ #include "disassembler.h" +#include "../main.h" #include "../bootmanager.h" #include "../hotkeys.h" @@ -158,8 +159,9 @@ void DisassemblerModel::SetNextInstruction(unsigned int address) { emit dataChanged(prev_index, prev_index); } -DisassemblerWidget::DisassemblerWidget(QWidget* parent, EmuThread& emu_thread) : QDockWidget(parent), base_addr(0), emu_thread(emu_thread) -{ +DisassemblerWidget::DisassemblerWidget(QWidget* parent, GMainWindow& main_window) : + QDockWidget(parent), main_window(main_window), base_addr(0) { + disasm_ui.setupUi(this); model = new DisassemblerModel(this); @@ -199,7 +201,7 @@ void DisassemblerWidget::Init() void DisassemblerWidget::OnContinue() { - emu_thread.SetCpuRunning(true); + main_window.GetEmuThread()->SetCpuRunning(true); } void DisassemblerWidget::OnStep() @@ -209,13 +211,13 @@ void DisassemblerWidget::OnStep() void DisassemblerWidget::OnStepInto() { - emu_thread.SetCpuRunning(false); - emu_thread.ExecStep(); + main_window.GetEmuThread()->SetCpuRunning(false); + main_window.GetEmuThread()->ExecStep(); } void DisassemblerWidget::OnPause() { - emu_thread.SetCpuRunning(false); + main_window.GetEmuThread()->SetCpuRunning(false); // TODO: By now, the CPU might not have actually stopped... if (Core::g_app_core) { @@ -225,7 +227,7 @@ void DisassemblerWidget::OnPause() void DisassemblerWidget::OnToggleStartStop() { - emu_thread.SetCpuRunning(!emu_thread.IsCpuRunning()); + main_window.GetEmuThread()->SetCpuRunning(!main_window.GetEmuThread()->IsCpuRunning()); } void DisassemblerWidget::OnDebugModeEntered() @@ -233,7 +235,7 @@ void DisassemblerWidget::OnDebugModeEntered() ARMword next_instr = Core::g_app_core->GetPC(); if (model->GetBreakPoints().IsAddressBreakPoint(next_instr)) - emu_thread.SetCpuRunning(false); + main_window.GetEmuThread()->SetCpuRunning(false); model->SetNextInstruction(next_instr); diff --git a/src/citra_qt/debugger/disassembler.h b/src/citra_qt/debugger/disassembler.h index 5e19d7c51..d9e32dbdf 100644 --- a/src/citra_qt/debugger/disassembler.h +++ b/src/citra_qt/debugger/disassembler.h @@ -13,7 +13,7 @@ #include "common/break_points.h" class QAction; -class EmuThread; +class GMainWindow; class DisassemblerModel : public QAbstractListModel { @@ -51,7 +51,7 @@ class DisassemblerWidget : public QDockWidget Q_OBJECT public: - DisassemblerWidget(QWidget* parent, EmuThread& emu_thread); + DisassemblerWidget(QWidget* parent, GMainWindow& main_window); void Init(); @@ -75,5 +75,5 @@ private: u32 base_addr; - EmuThread& emu_thread; + GMainWindow& main_window; }; |