summaryrefslogtreecommitdiff
path: root/src/citra_qt/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/citra_qt/main.cpp')
-rw-r--r--src/citra_qt/main.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index 430a4ece4..b4e3ad964 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -20,7 +20,9 @@
20#include "debugger/callstack.hxx" 20#include "debugger/callstack.hxx"
21#include "debugger/ramview.hxx" 21#include "debugger/ramview.hxx"
22#include "debugger/graphics.hxx" 22#include "debugger/graphics.hxx"
23#include "debugger/graphics_breakpoints.hxx"
23#include "debugger/graphics_cmdlists.hxx" 24#include "debugger/graphics_cmdlists.hxx"
25#include "debugger/graphics_framebuffer.hxx"
24 26
25#include "core/settings.h" 27#include "core/settings.h"
26#include "core/system.h" 28#include "core/system.h"
@@ -36,6 +38,8 @@ GMainWindow::GMainWindow()
36{ 38{
37 LogManager::Init(); 39 LogManager::Init();
38 40
41 Pica::g_debug_context = Pica::DebugContext::Construct();
42
39 Config config; 43 Config config;
40 44
41 if (!Settings::values.enable_log) 45 if (!Settings::values.enable_log)
@@ -67,12 +71,22 @@ GMainWindow::GMainWindow()
67 addDockWidget(Qt::RightDockWidgetArea, graphicsCommandsWidget); 71 addDockWidget(Qt::RightDockWidgetArea, graphicsCommandsWidget);
68 graphicsCommandsWidget->hide(); 72 graphicsCommandsWidget->hide();
69 73
74 auto graphicsBreakpointsWidget = new GraphicsBreakPointsWidget(Pica::g_debug_context, this);
75 addDockWidget(Qt::RightDockWidgetArea, graphicsBreakpointsWidget);
76 graphicsBreakpointsWidget->hide();
77
78 auto graphicsFramebufferWidget = new GraphicsFramebufferWidget(Pica::g_debug_context, this);
79 addDockWidget(Qt::RightDockWidgetArea, graphicsFramebufferWidget);
80 graphicsFramebufferWidget->hide();
81
70 QMenu* debug_menu = ui.menu_View->addMenu(tr("Debugging")); 82 QMenu* debug_menu = ui.menu_View->addMenu(tr("Debugging"));
71 debug_menu->addAction(disasmWidget->toggleViewAction()); 83 debug_menu->addAction(disasmWidget->toggleViewAction());
72 debug_menu->addAction(registersWidget->toggleViewAction()); 84 debug_menu->addAction(registersWidget->toggleViewAction());
73 debug_menu->addAction(callstackWidget->toggleViewAction()); 85 debug_menu->addAction(callstackWidget->toggleViewAction());
74 debug_menu->addAction(graphicsWidget->toggleViewAction()); 86 debug_menu->addAction(graphicsWidget->toggleViewAction());
75 debug_menu->addAction(graphicsCommandsWidget->toggleViewAction()); 87 debug_menu->addAction(graphicsCommandsWidget->toggleViewAction());
88 debug_menu->addAction(graphicsBreakpointsWidget->toggleViewAction());
89 debug_menu->addAction(graphicsFramebufferWidget->toggleViewAction());
76 90
77 // Set default UI state 91 // Set default UI state
78 // geometry: 55% of the window contents are in the upper screen half, 45% in the lower half 92 // geometry: 55% of the window contents are in the upper screen half, 45% in the lower half
@@ -133,6 +147,8 @@ GMainWindow::~GMainWindow()
133 // will get automatically deleted otherwise 147 // will get automatically deleted otherwise
134 if (render_window->parent() == nullptr) 148 if (render_window->parent() == nullptr)
135 delete render_window; 149 delete render_window;
150
151 Pica::g_debug_context.reset();
136} 152}
137 153
138void GMainWindow::BootGame(std::string filename) 154void GMainWindow::BootGame(std::string filename)
@@ -164,7 +180,7 @@ void GMainWindow::BootGame(std::string filename)
164 180
165void GMainWindow::OnMenuLoadFile() 181void GMainWindow::OnMenuLoadFile()
166{ 182{
167 QString filename = QFileDialog::getOpenFileName(this, tr("Load file"), QString(), tr("3DS executable (*.elf *.axf *.bin *.cci *.cxi)")); 183 QString filename = QFileDialog::getOpenFileName(this, tr("Load file"), QString(), tr("3DS executable (*.3dsx *.elf *.axf *.bin *.cci *.cxi)"));
168 if (filename.size()) 184 if (filename.size())
169 BootGame(filename.toLatin1().data()); 185 BootGame(filename.toLatin1().data());
170} 186}