citra-emu
/
citra
Archived
1
0
Fork 0

added symbol map load function to Qt GUI

This commit is contained in:
bunnei 2014-04-30 23:46:57 -04:00
parent 29da6e9ab5
commit 08fb71108a
4 changed files with 31 additions and 11 deletions

View File

@ -23,6 +23,7 @@
#include "core/system.h"
#include "core/loader.h"
#include "core/core.h"
#include "core/arm/disassembler/load_symbol_map.h"
#include "version.h"
@ -74,6 +75,7 @@ GMainWindow::GMainWindow()
// Setup connections
connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile()));
connect(ui.action_Load_Symbol_Map, SIGNAL(triggered()), this, SLOT(OnMenuLoadSymbolMap()));
connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame()));
connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame()));
connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame()));
@ -140,11 +142,17 @@ void GMainWindow::BootGame(const char* filename)
void GMainWindow::OnMenuLoadFile()
{
QString filename = QFileDialog::getOpenFileName(this, tr("Load file"), QString(), tr("3DS homebrew (*.elf *.dat)"));
QString filename = QFileDialog::getOpenFileName(this, tr("Load file"), QString(), tr("3DS homebrew (*.elf *.dat *.bin)"));
if (filename.size())
BootGame(filename.toLatin1().data());
}
void GMainWindow::OnMenuLoadSymbolMap() {
QString filename = QFileDialog::getOpenFileName(this, tr("Load symbol map"), QString(), tr("Symbol map (*)"));
if (filename.size())
LoadSymbolMap(filename.toLatin1().data());
}
void GMainWindow::OnStartGame()
{
render_window->GetEmuThread().SetCpuRunning(true);

View File

@ -37,6 +37,7 @@ private slots:
void OnPauseGame();
void OnStopGame();
void OnMenuLoadFile();
void OnMenuLoadSymbolMap();
void OnOpenHotkeysDialog();
void OnConfigure();
void ToggleWindowMode();

View File

@ -40,6 +40,7 @@
<string>&amp;File</string>
</property>
<addaction name="action_Load_File"/>
<addaction name="action_Load_Symbol_Map"/>
<addaction name="separator"/>
<addaction name="action_Exit"/>
</widget>
@ -77,6 +78,11 @@
<string>Load file...</string>
</property>
</action>
<action name="action_Load_Symbol_Map">
<property name="text">
<string>Load symbol map...</string>
</property>
</action>
<action name="action_Exit">
<property name="text">
<string>E&amp;xit</string>

View File

@ -27,6 +27,7 @@ class Ui_MainWindow
{
public:
QAction *action_Load_File;
QAction *action_Load_Symbol_Map;
QAction *action_Exit;
QAction *action_Start;
QAction *action_Pause;
@ -56,6 +57,8 @@ public:
MainWindow->setDockNestingEnabled(true);
action_Load_File = new QAction(MainWindow);
action_Load_File->setObjectName(QString::fromUtf8("action_Load_File"));
action_Load_Symbol_Map = new QAction(MainWindow);
action_Load_Symbol_Map->setObjectName(QString::fromUtf8("action_Load_Symbol_Map"));
action_Exit = new QAction(MainWindow);
action_Exit->setObjectName(QString::fromUtf8("action_Exit"));
action_Start = new QAction(MainWindow);
@ -101,6 +104,7 @@ public:
menubar->addAction(menu_View->menuAction());
menubar->addAction(menu_Help->menuAction());
menu_File->addAction(action_Load_File);
menu_File->addAction(action_Load_Symbol_Map);
menu_File->addSeparator();
menu_File->addAction(action_Exit);
menu_Emulation->addAction(action_Start);
@ -123,6 +127,7 @@ public:
{
MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Citra", 0, QApplication::UnicodeUTF8));
action_Load_File->setText(QApplication::translate("MainWindow", "Load file...", 0, QApplication::UnicodeUTF8));
action_Load_Symbol_Map->setText(QApplication::translate("MainWindow", "Load symbol map...", 0, QApplication::UnicodeUTF8));
action_Exit->setText(QApplication::translate("MainWindow", "E&xit", 0, QApplication::UnicodeUTF8));
action_Start->setText(QApplication::translate("MainWindow", "&Start", 0, QApplication::UnicodeUTF8));
action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 0, QApplication::UnicodeUTF8));