diff options
| author | 2014-04-30 23:46:57 -0400 | |
|---|---|---|
| committer | 2014-04-30 23:46:57 -0400 | |
| commit | 08fb71108abe2862bf02a44cc6e103b86a24f43f (patch) | |
| tree | 653b385d872c5fa3099efba46f0ef86259d13dad /src | |
| parent | added a module to load symbol map files for debugging (diff) | |
| download | yuzu-08fb71108abe2862bf02a44cc6e103b86a24f43f.tar.gz yuzu-08fb71108abe2862bf02a44cc6e103b86a24f43f.tar.xz yuzu-08fb71108abe2862bf02a44cc6e103b86a24f43f.zip | |
added symbol map load function to Qt GUI
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra_qt/main.cpp | 10 | ||||
| -rw-r--r-- | src/citra_qt/main.hxx | 9 | ||||
| -rw-r--r-- | src/citra_qt/main.ui | 18 | ||||
| -rw-r--r-- | src/citra_qt/ui_main.h | 5 |
4 files changed, 31 insertions, 11 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 89aae7ce6..76e0c68c3 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include "core/system.h" | 23 | #include "core/system.h" |
| 24 | #include "core/loader.h" | 24 | #include "core/loader.h" |
| 25 | #include "core/core.h" | 25 | #include "core/core.h" |
| 26 | #include "core/arm/disassembler/load_symbol_map.h" | ||
| 26 | #include "version.h" | 27 | #include "version.h" |
| 27 | 28 | ||
| 28 | 29 | ||
| @@ -74,6 +75,7 @@ GMainWindow::GMainWindow() | |||
| 74 | 75 | ||
| 75 | // Setup connections | 76 | // Setup connections |
| 76 | connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile())); | 77 | connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile())); |
| 78 | connect(ui.action_Load_Symbol_Map, SIGNAL(triggered()), this, SLOT(OnMenuLoadSymbolMap())); | ||
| 77 | connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame())); | 79 | connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame())); |
| 78 | connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame())); | 80 | connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame())); |
| 79 | connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); | 81 | connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); |
| @@ -140,11 +142,17 @@ void GMainWindow::BootGame(const char* filename) | |||
| 140 | 142 | ||
| 141 | void GMainWindow::OnMenuLoadFile() | 143 | void GMainWindow::OnMenuLoadFile() |
| 142 | { | 144 | { |
| 143 | QString filename = QFileDialog::getOpenFileName(this, tr("Load file"), QString(), tr("3DS homebrew (*.elf *.dat)")); | 145 | QString filename = QFileDialog::getOpenFileName(this, tr("Load file"), QString(), tr("3DS homebrew (*.elf *.dat *.bin)")); |
| 144 | if (filename.size()) | 146 | if (filename.size()) |
| 145 | BootGame(filename.toLatin1().data()); | 147 | BootGame(filename.toLatin1().data()); |
| 146 | } | 148 | } |
| 147 | 149 | ||
| 150 | void GMainWindow::OnMenuLoadSymbolMap() { | ||
| 151 | QString filename = QFileDialog::getOpenFileName(this, tr("Load symbol map"), QString(), tr("Symbol map (*)")); | ||
| 152 | if (filename.size()) | ||
| 153 | LoadSymbolMap(filename.toLatin1().data()); | ||
| 154 | } | ||
| 155 | |||
| 148 | void GMainWindow::OnStartGame() | 156 | void GMainWindow::OnStartGame() |
| 149 | { | 157 | { |
| 150 | render_window->GetEmuThread().SetCpuRunning(true); | 158 | render_window->GetEmuThread().SetCpuRunning(true); |
diff --git a/src/citra_qt/main.hxx b/src/citra_qt/main.hxx index b4b1c533c..fa122f76e 100644 --- a/src/citra_qt/main.hxx +++ b/src/citra_qt/main.hxx | |||
| @@ -33,10 +33,11 @@ private: | |||
| 33 | void closeEvent(QCloseEvent* event); | 33 | void closeEvent(QCloseEvent* event); |
| 34 | 34 | ||
| 35 | private slots: | 35 | private slots: |
| 36 | void OnStartGame(); | 36 | void OnStartGame(); |
| 37 | void OnPauseGame(); | 37 | void OnPauseGame(); |
| 38 | void OnStopGame(); | 38 | void OnStopGame(); |
| 39 | void OnMenuLoadFile(); | 39 | void OnMenuLoadFile(); |
| 40 | void OnMenuLoadSymbolMap(); | ||
| 40 | void OnOpenHotkeysDialog(); | 41 | void OnOpenHotkeysDialog(); |
| 41 | void OnConfigure(); | 42 | void OnConfigure(); |
| 42 | void ToggleWindowMode(); | 43 | void ToggleWindowMode(); |
diff --git a/src/citra_qt/main.ui b/src/citra_qt/main.ui index c0cb11a10..f3596716f 100644 --- a/src/citra_qt/main.ui +++ b/src/citra_qt/main.ui | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | <string>&File</string> | 40 | <string>&File</string> |
| 41 | </property> | 41 | </property> |
| 42 | <addaction name="action_Load_File"/> | 42 | <addaction name="action_Load_File"/> |
| 43 | <addaction name="action_Load_Symbol_Map"/> | ||
| 43 | <addaction name="separator"/> | 44 | <addaction name="separator"/> |
| 44 | <addaction name="action_Exit"/> | 45 | <addaction name="action_Exit"/> |
| 45 | </widget> | 46 | </widget> |
| @@ -72,12 +73,17 @@ | |||
| 72 | <addaction name="menu_Help"/> | 73 | <addaction name="menu_Help"/> |
| 73 | </widget> | 74 | </widget> |
| 74 | <widget class="QStatusBar" name="statusbar"/> | 75 | <widget class="QStatusBar" name="statusbar"/> |
| 75 | <action name="action_Load_File"> | 76 | <action name="action_Load_File"> |
| 76 | <property name="text"> | 77 | <property name="text"> |
| 77 | <string>Load file...</string> | 78 | <string>Load file...</string> |
| 78 | </property> | 79 | </property> |
| 79 | </action> | 80 | </action> |
| 80 | <action name="action_Exit"> | 81 | <action name="action_Load_Symbol_Map"> |
| 82 | <property name="text"> | ||
| 83 | <string>Load symbol map...</string> | ||
| 84 | </property> | ||
| 85 | </action> | ||
| 86 | <action name="action_Exit"> | ||
| 81 | <property name="text"> | 87 | <property name="text"> |
| 82 | <string>E&xit</string> | 88 | <string>E&xit</string> |
| 83 | </property> | 89 | </property> |
diff --git a/src/citra_qt/ui_main.h b/src/citra_qt/ui_main.h index cd3906ecc..04979e5ab 100644 --- a/src/citra_qt/ui_main.h +++ b/src/citra_qt/ui_main.h | |||
| @@ -27,6 +27,7 @@ class Ui_MainWindow | |||
| 27 | { | 27 | { |
| 28 | public: | 28 | public: |
| 29 | QAction *action_Load_File; | 29 | QAction *action_Load_File; |
| 30 | QAction *action_Load_Symbol_Map; | ||
| 30 | QAction *action_Exit; | 31 | QAction *action_Exit; |
| 31 | QAction *action_Start; | 32 | QAction *action_Start; |
| 32 | QAction *action_Pause; | 33 | QAction *action_Pause; |
| @@ -56,6 +57,8 @@ public: | |||
| 56 | MainWindow->setDockNestingEnabled(true); | 57 | MainWindow->setDockNestingEnabled(true); |
| 57 | action_Load_File = new QAction(MainWindow); | 58 | action_Load_File = new QAction(MainWindow); |
| 58 | action_Load_File->setObjectName(QString::fromUtf8("action_Load_File")); | 59 | action_Load_File->setObjectName(QString::fromUtf8("action_Load_File")); |
| 60 | action_Load_Symbol_Map = new QAction(MainWindow); | ||
| 61 | action_Load_Symbol_Map->setObjectName(QString::fromUtf8("action_Load_Symbol_Map")); | ||
| 59 | action_Exit = new QAction(MainWindow); | 62 | action_Exit = new QAction(MainWindow); |
| 60 | action_Exit->setObjectName(QString::fromUtf8("action_Exit")); | 63 | action_Exit->setObjectName(QString::fromUtf8("action_Exit")); |
| 61 | action_Start = new QAction(MainWindow); | 64 | action_Start = new QAction(MainWindow); |
| @@ -101,6 +104,7 @@ public: | |||
| 101 | menubar->addAction(menu_View->menuAction()); | 104 | menubar->addAction(menu_View->menuAction()); |
| 102 | menubar->addAction(menu_Help->menuAction()); | 105 | menubar->addAction(menu_Help->menuAction()); |
| 103 | menu_File->addAction(action_Load_File); | 106 | menu_File->addAction(action_Load_File); |
| 107 | menu_File->addAction(action_Load_Symbol_Map); | ||
| 104 | menu_File->addSeparator(); | 108 | menu_File->addSeparator(); |
| 105 | menu_File->addAction(action_Exit); | 109 | menu_File->addAction(action_Exit); |
| 106 | menu_Emulation->addAction(action_Start); | 110 | menu_Emulation->addAction(action_Start); |
| @@ -123,6 +127,7 @@ public: | |||
| 123 | { | 127 | { |
| 124 | MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Citra", 0, QApplication::UnicodeUTF8)); | 128 | MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Citra", 0, QApplication::UnicodeUTF8)); |
| 125 | action_Load_File->setText(QApplication::translate("MainWindow", "Load file...", 0, QApplication::UnicodeUTF8)); | 129 | action_Load_File->setText(QApplication::translate("MainWindow", "Load file...", 0, QApplication::UnicodeUTF8)); |
| 130 | action_Load_Symbol_Map->setText(QApplication::translate("MainWindow", "Load symbol map...", 0, QApplication::UnicodeUTF8)); | ||
| 126 | action_Exit->setText(QApplication::translate("MainWindow", "E&xit", 0, QApplication::UnicodeUTF8)); | 131 | action_Exit->setText(QApplication::translate("MainWindow", "E&xit", 0, QApplication::UnicodeUTF8)); |
| 127 | action_Start->setText(QApplication::translate("MainWindow", "&Start", 0, QApplication::UnicodeUTF8)); | 132 | action_Start->setText(QApplication::translate("MainWindow", "&Start", 0, QApplication::UnicodeUTF8)); |
| 128 | action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 0, QApplication::UnicodeUTF8)); | 133 | action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 0, QApplication::UnicodeUTF8)); |