mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-27 01:22:37 -06:00
added symbol map load function to Qt GUI
This commit is contained in:
parent
29da6e9ab5
commit
08fb71108a
4 changed files with 31 additions and 11 deletions
|
@ -23,6 +23,7 @@
|
||||||
#include "core/system.h"
|
#include "core/system.h"
|
||||||
#include "core/loader.h"
|
#include "core/loader.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
|
#include "core/arm/disassembler/load_symbol_map.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,6 +75,7 @@ GMainWindow::GMainWindow()
|
||||||
|
|
||||||
// Setup connections
|
// Setup connections
|
||||||
connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile()));
|
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_Start, SIGNAL(triggered()), this, SLOT(OnStartGame()));
|
||||||
connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame()));
|
connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame()));
|
||||||
connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame()));
|
connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame()));
|
||||||
|
@ -140,11 +142,17 @@ void GMainWindow::BootGame(const char* filename)
|
||||||
|
|
||||||
void GMainWindow::OnMenuLoadFile()
|
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())
|
if (filename.size())
|
||||||
BootGame(filename.toLatin1().data());
|
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()
|
void GMainWindow::OnStartGame()
|
||||||
{
|
{
|
||||||
render_window->GetEmuThread().SetCpuRunning(true);
|
render_window->GetEmuThread().SetCpuRunning(true);
|
||||||
|
|
|
@ -33,10 +33,11 @@ private:
|
||||||
void closeEvent(QCloseEvent* event);
|
void closeEvent(QCloseEvent* event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void OnStartGame();
|
void OnStartGame();
|
||||||
void OnPauseGame();
|
void OnPauseGame();
|
||||||
void OnStopGame();
|
void OnStopGame();
|
||||||
void OnMenuLoadFile();
|
void OnMenuLoadFile();
|
||||||
|
void OnMenuLoadSymbolMap();
|
||||||
void OnOpenHotkeysDialog();
|
void OnOpenHotkeysDialog();
|
||||||
void OnConfigure();
|
void OnConfigure();
|
||||||
void ToggleWindowMode();
|
void ToggleWindowMode();
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
<string>&File</string>
|
<string>&File</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="action_Load_File"/>
|
<addaction name="action_Load_File"/>
|
||||||
|
<addaction name="action_Load_Symbol_Map"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="action_Exit"/>
|
<addaction name="action_Exit"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -72,12 +73,17 @@
|
||||||
<addaction name="menu_Help"/>
|
<addaction name="menu_Help"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusbar"/>
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
<action name="action_Load_File">
|
<action name="action_Load_File">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Load file...</string>
|
<string>Load file...</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="action_Exit">
|
<action name="action_Load_Symbol_Map">
|
||||||
|
<property name="text">
|
||||||
|
<string>Load symbol map...</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="action_Exit">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>E&xit</string>
|
<string>E&xit</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -27,6 +27,7 @@ class Ui_MainWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QAction *action_Load_File;
|
QAction *action_Load_File;
|
||||||
|
QAction *action_Load_Symbol_Map;
|
||||||
QAction *action_Exit;
|
QAction *action_Exit;
|
||||||
QAction *action_Start;
|
QAction *action_Start;
|
||||||
QAction *action_Pause;
|
QAction *action_Pause;
|
||||||
|
@ -56,6 +57,8 @@ public:
|
||||||
MainWindow->setDockNestingEnabled(true);
|
MainWindow->setDockNestingEnabled(true);
|
||||||
action_Load_File = new QAction(MainWindow);
|
action_Load_File = new QAction(MainWindow);
|
||||||
action_Load_File->setObjectName(QString::fromUtf8("action_Load_File"));
|
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 = new QAction(MainWindow);
|
||||||
action_Exit->setObjectName(QString::fromUtf8("action_Exit"));
|
action_Exit->setObjectName(QString::fromUtf8("action_Exit"));
|
||||||
action_Start = new QAction(MainWindow);
|
action_Start = new QAction(MainWindow);
|
||||||
|
@ -101,6 +104,7 @@ public:
|
||||||
menubar->addAction(menu_View->menuAction());
|
menubar->addAction(menu_View->menuAction());
|
||||||
menubar->addAction(menu_Help->menuAction());
|
menubar->addAction(menu_Help->menuAction());
|
||||||
menu_File->addAction(action_Load_File);
|
menu_File->addAction(action_Load_File);
|
||||||
|
menu_File->addAction(action_Load_Symbol_Map);
|
||||||
menu_File->addSeparator();
|
menu_File->addSeparator();
|
||||||
menu_File->addAction(action_Exit);
|
menu_File->addAction(action_Exit);
|
||||||
menu_Emulation->addAction(action_Start);
|
menu_Emulation->addAction(action_Start);
|
||||||
|
@ -123,6 +127,7 @@ public:
|
||||||
{
|
{
|
||||||
MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Citra", 0, QApplication::UnicodeUTF8));
|
MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Citra", 0, QApplication::UnicodeUTF8));
|
||||||
action_Load_File->setText(QApplication::translate("MainWindow", "Load file...", 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_Exit->setText(QApplication::translate("MainWindow", "E&xit", 0, QApplication::UnicodeUTF8));
|
||||||
action_Start->setText(QApplication::translate("MainWindow", "&Start", 0, QApplication::UnicodeUTF8));
|
action_Start->setText(QApplication::translate("MainWindow", "&Start", 0, QApplication::UnicodeUTF8));
|
||||||
action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 0, QApplication::UnicodeUTF8));
|
action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 0, QApplication::UnicodeUTF8));
|
||||||
|
|
Loading…
Reference in a new issue