summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/CMakeLists.txt50
-rw-r--r--src/citra_qt/bootmanager.cpp17
-rw-r--r--src/citra_qt/bootmanager.hxx4
-rw-r--r--src/citra_qt/callstack.hxx2
-rw-r--r--src/citra_qt/citra_qt.vcxproj20
-rw-r--r--src/citra_qt/citra_qt.vcxproj.filters14
-rw-r--r--src/citra_qt/config/controller_config.hxx2
-rw-r--r--src/citra_qt/cpu_regs.cpp40
-rw-r--r--src/citra_qt/disasm.cpp26
-rw-r--r--src/citra_qt/disasm.hxx4
-rw-r--r--src/citra_qt/main.cpp32
-rw-r--r--src/citra_qt/main.hxx2
-rw-r--r--src/citra_qt/main.ui9
-rw-r--r--src/citra_qt/qt-build.props13
-rw-r--r--src/citra_qt/qt-build.targets9
-rw-r--r--src/citra_qt/qt-build.xml9
-rw-r--r--src/citra_qt/ramview.cpp4
-rw-r--r--src/citra_qt/ui_controller_config.h (renamed from src/citra_qt/config/ui_controller_config.h)0
-rw-r--r--src/citra_qt/ui_gfx_fifo_player.h209
-rw-r--r--src/citra_qt/ui_image_info.h154
-rw-r--r--src/citra_qt/ui_main.h6
-rw-r--r--src/citra_qt/ui_welcome_wizard.h124
-rw-r--r--src/common/common.vcxproj2
-rw-r--r--src/common/common.vcxproj.filters2
-rw-r--r--src/common/symbols.cpp57
-rw-r--r--src/common/symbols.h39
-rw-r--r--src/core/elf/elf_reader.cpp76
27 files changed, 250 insertions, 676 deletions
diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt
index facb99e90..21b85e5b8 100644
--- a/src/citra_qt/CMakeLists.txt
+++ b/src/citra_qt/CMakeLists.txt
@@ -1,36 +1,36 @@
set(SRCS
- src/bootmanager.cpp
- src/callstack.cpp
- src/disasm.cpp
- src/cpu_regs.cpp
- src/hotkeys.cpp
- src/main.cpp
- src/ramview.cpp
- src/config/controller_config.cpp
- src/config/controller_config_util.cpp)
+ bootmanager.cpp
+ callstack.cpp
+ disasm.cpp
+ cpu_regs.cpp
+ hotkeys.cpp
+ main.cpp
+ ramview.cpp
+ config/controller_config.cpp
+ config/controller_config_util.cpp)
qt4_wrap_ui(UI_HDRS
- src/callstack.ui
- src/disasm.ui
- src/cpu_regs.ui
- src/hotkeys.ui
- src/main.ui
- src/config/controller_config.ui)
+ callstack.ui
+ disasm.ui
+ cpu_regs.ui
+ hotkeys.ui
+ main.ui
+ config/controller_config.ui)
qt4_wrap_cpp(MOC_SRCS
- src/bootmanager.hxx
- src/callstack.hxx
- src/disasm.hxx
- src/cpu_regs.hxx
- src/hotkeys.hxx
- src/main.hxx
- src/ramview.hxx
- src/config/controller_config.hxx
- src/config/controller_config_util.hxx)
+ bootmanager.hxx
+ callstack.hxx
+ disasm.hxx
+ cpu_regs.hxx
+ hotkeys.hxx
+ main.hxx
+ ramview.hxx
+ config/controller_config.hxx
+ config/controller_config_util.hxx)
# add uic results to include directories
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(./src/)
+include_directories(./)
add_executable(citra-qt ${SRCS} ${MOC_SRCS} ${UI_HDRS})
target_link_libraries(citra-qt core common qhexedit ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} rt GLEW ${GLFW_LIBRARIES})
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp
index 095856dc9..31958ac28 100644
--- a/src/citra_qt/bootmanager.cpp
+++ b/src/citra_qt/bootmanager.cpp
@@ -1,11 +1,12 @@
#include <QHBoxLayout>
#include <QKeyEvent>
-#include "common.h"
+#include "common/common.h"
#include "bootmanager.hxx"
-#include "core.h"
-#include "loader.h"
+#include "core/core.h"
+#include "core/loader.h"
+#include "video_core/video_core.h"
#include "version.h"
@@ -35,7 +36,8 @@ void EmuThread::run()
exec_cpu_step = false;
Core::SingleStep();
- emit CPUStepped();
+ if (!cpu_running)
+ emit CPUStepped();
}
}
}
@@ -85,8 +87,8 @@ public:
// makeCurrent();
}
void resizeEvent(QResizeEvent* ev) {
- parent_->set_client_area_width(size().width());
- parent_->set_client_area_height(size().height());
+ parent_->SetClientAreaWidth(size().width());
+ parent_->SetClientAreaHeight(size().height());
}
private:
GRenderWindow* parent_;
@@ -103,9 +105,8 @@ GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this
// TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose
child = new GGLWidgetInternal(this);
-
QBoxLayout* layout = new QHBoxLayout(this);
- resize(640, 480); // TODO: Load size from config instead
+ resize(VideoCore::kScreenTopWidth, VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight);
layout->addWidget(child);
layout->setMargin(0);
setLayout(layout);
diff --git a/src/citra_qt/bootmanager.hxx b/src/citra_qt/bootmanager.hxx
index b3aa1cf30..1001e1ee4 100644
--- a/src/citra_qt/bootmanager.hxx
+++ b/src/citra_qt/bootmanager.hxx
@@ -1,7 +1,7 @@
#include <QThread>
#include <QGLWidget>
-#include "common.h"
-#include "emu_window.h"
+#include "common/common.h"
+#include "common/emu_window.h"
class GRenderWindow;
class QKeyEvent;
diff --git a/src/citra_qt/callstack.hxx b/src/citra_qt/callstack.hxx
index 60b24f236..4df1b96d5 100644
--- a/src/citra_qt/callstack.hxx
+++ b/src/citra_qt/callstack.hxx
@@ -1,6 +1,6 @@
#include <QDockWidget>
#include "ui_callstack.h"
-#include "platform.h"
+#include "common/platform.h"
class QStandardItemModel;
diff --git a/src/citra_qt/citra_qt.vcxproj b/src/citra_qt/citra_qt.vcxproj
index da8740bec..735f06e5b 100644
--- a/src/citra_qt/citra_qt.vcxproj
+++ b/src/citra_qt/citra_qt.vcxproj
@@ -142,6 +142,15 @@
<MOC Include="..\..\externals\qhexedit\qhexedit.h" />
<MOC Include="..\..\externals\qhexedit\qhexedit_p.h" />
<MOC Include="..\..\externals\qhexedit\xbytearray.h" />
+ <MOC Include="config\controller_config.hxx" />
+ <MOC Include="config\controller_config_util.hxx" />
+ <MOC Include="callstack.hxx" />
+ <MOC Include="cpu_regs.hxx" />
+ <MOC Include="disasm.hxx" />
+ <MOC Include="ramview.hxx" />
+ <MOC Include="bootmanager.hxx" />
+ <MOC Include="hotkeys.hxx" />
+ <MOC Include="main.hxx" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\common\common.vcxproj">
@@ -150,26 +159,23 @@
<ProjectReference Include="..\core\core.vcxproj">
<Project>{8aea7f29-3466-4786-a10d-6a4bd0610977}</Project>
</ProjectReference>
+ <ProjectReference Include="..\video_core\video_core.vcxproj">
+ <Project>{6678d1a3-33a6-48a9-878b-48e5d2903d27}</Project>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="bootmanager.hxx" />
<ClInclude Include="callstack.hxx" />
<ClInclude Include="config\controller_config.hxx" />
<ClInclude Include="config\controller_config_util.hxx" />
- <ClInclude Include="config\ui_controller_config.h" />
<ClInclude Include="cpu_regs.hxx" />
<ClInclude Include="disasm.hxx" />
- <ClInclude Include="hotkeys.hxx" />
- <ClInclude Include="main.hxx" />
<ClInclude Include="ramview.hxx" />
<ClInclude Include="ui_callstack.h" />
+ <ClInclude Include="ui_controller_config.h" />
<ClInclude Include="ui_cpu_regs.h" />
<ClInclude Include="ui_disasm.h" />
- <ClInclude Include="ui_gfx_fifo_player.h" />
<ClInclude Include="ui_hotkeys.h" />
- <ClInclude Include="ui_image_info.h" />
<ClInclude Include="ui_main.h" />
- <ClInclude Include="ui_welcome_wizard.h" />
<ClInclude Include="version.h" />
</ItemGroup>
<ItemGroup>
diff --git a/src/citra_qt/citra_qt.vcxproj.filters b/src/citra_qt/citra_qt.vcxproj.filters
index 5bc29c1d7..5b292c120 100644
--- a/src/citra_qt/citra_qt.vcxproj.filters
+++ b/src/citra_qt/citra_qt.vcxproj.filters
@@ -61,13 +61,10 @@
</MOC>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="bootmanager.hxx" />
<ClInclude Include="hotkeys.hxx" />
- <ClInclude Include="main.hxx" />
<ClInclude Include="ui_hotkeys.h" />
- <ClInclude Include="ui_image_info.h" />
+ <ClInclude Include="main.hxx" />
<ClInclude Include="ui_main.h" />
- <ClInclude Include="ui_welcome_wizard.h" />
<ClInclude Include="version.h" />
<ClInclude Include="config\controller_config.hxx">
<Filter>config</Filter>
@@ -75,9 +72,6 @@
<ClInclude Include="config\controller_config_util.hxx">
<Filter>config</Filter>
</ClInclude>
- <ClInclude Include="config\ui_controller_config.h">
- <Filter>config</Filter>
- </ClInclude>
<ClInclude Include="cpu_regs.hxx">
<Filter>debugger</Filter>
</ClInclude>
@@ -96,12 +90,12 @@
<ClInclude Include="ui_disasm.h">
<Filter>debugger</Filter>
</ClInclude>
- <ClInclude Include="ui_gfx_fifo_player.h">
- <Filter>debugger</Filter>
- </ClInclude>
<ClInclude Include="callstack.hxx">
<Filter>debugger</Filter>
</ClInclude>
+ <ClInclude Include="ui_controller_config.h">
+ <Filter>config</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<UIC Include="hotkeys.ui" />
diff --git a/src/citra_qt/config/controller_config.hxx b/src/citra_qt/config/controller_config.hxx
index 9ff86a110..0e423ee50 100644
--- a/src/citra_qt/config/controller_config.hxx
+++ b/src/citra_qt/config/controller_config.hxx
@@ -3,7 +3,7 @@
#include <QDialog>
-#include "ui_controller_config.h"
+//#include "ui_controller_config.h"
/* TODO(bunnei): ImplementMe
diff --git a/src/citra_qt/cpu_regs.cpp b/src/citra_qt/cpu_regs.cpp
index f2859f695..7e54e18b0 100644
--- a/src/citra_qt/cpu_regs.cpp
+++ b/src/citra_qt/cpu_regs.cpp
@@ -1,7 +1,7 @@
#include "cpu_regs.hxx"
-#include "core.h"
-#include "arm/interpreter/armdefs.h"
+#include "core/core.h"
+#include "core/arm/interpreter/armdefs.h"
GARM11RegsView::GARM11RegsView(QWidget* parent) : QDockWidget(parent)
{
@@ -42,22 +42,22 @@ void GARM11RegsView::OnCPUStepped()
ARM_Interface* app_core = Core::g_app_core;
for (int i = 0; i < 16; ++i)
- registers->child(i)->setText(1, QString("0x%1").arg(app_core->Reg(i), 8, 16, QLatin1Char('0')));
-
- CSPR->setText(1, QString("0x%1").arg(app_core->CPSR(), 8, 16, QLatin1Char('0')));
- CSPR->child(0)->setText(1, QString("b%1").arg(app_core->CPSR() & 0x1F, 5, 2, QLatin1Char('0'))); // M - Mode
- CSPR->child(1)->setText(1, QString("%1").arg((app_core->CPSR() >> 5) & 0x1)); // T - State
- CSPR->child(2)->setText(1, QString("%1").arg((app_core->CPSR() >> 6) & 0x1)); // F - FIQ disable
- CSPR->child(3)->setText(1, QString("%1").arg((app_core->CPSR() >> 7) & 0x1)); // I - IRQ disable
- CSPR->child(4)->setText(1, QString("%1").arg((app_core->CPSR() >> 8) & 0x1)); // A - Imprecise abort
- CSPR->child(5)->setText(1, QString("%1").arg((app_core->CPSR() >> 9) & 0x1)); // E - Data endianess
- CSPR->child(6)->setText(1, QString("%1").arg((app_core->CPSR() >> 10) & 0x3F)); // IT - If-Then state (DNM)
- CSPR->child(7)->setText(1, QString("%1").arg((app_core->CPSR() >> 16) & 0xF)); // GE - Greater-than-or-Equal
- CSPR->child(8)->setText(1, QString("%1").arg((app_core->CPSR() >> 20) & 0xF)); // DNM - Do not modify
- CSPR->child(9)->setText(1, QString("%1").arg((app_core->CPSR() >> 24) & 0x1)); // J - Java state
- CSPR->child(10)->setText(1, QString("%1").arg((app_core->CPSR() >> 27) & 0x1)); // Q - Sticky overflow
- CSPR->child(11)->setText(1, QString("%1").arg((app_core->CPSR() >> 28) & 0x1)); // V - Overflow
- CSPR->child(12)->setText(1, QString("%1").arg((app_core->CPSR() >> 29) & 0x1)); // C - Carry/Borrow/Extend
- CSPR->child(13)->setText(1, QString("%1").arg((app_core->CPSR() >> 30) & 0x1)); // Z - Zero
- CSPR->child(14)->setText(1, QString("%1").arg((app_core->CPSR() >> 31) & 0x1)); // N - Negative/Less than
+ registers->child(i)->setText(1, QString("0x%1").arg(app_core->GetReg(i), 8, 16, QLatin1Char('0')));
+
+ CSPR->setText(1, QString("0x%1").arg(app_core->GetCPSR(), 8, 16, QLatin1Char('0')));
+ CSPR->child(0)->setText(1, QString("b%1").arg(app_core->GetCPSR() & 0x1F, 5, 2, QLatin1Char('0'))); // M - Mode
+ CSPR->child(1)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 5) & 0x1)); // T - State
+ CSPR->child(2)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 6) & 0x1)); // F - FIQ disable
+ CSPR->child(3)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 7) & 0x1)); // I - IRQ disable
+ CSPR->child(4)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 8) & 0x1)); // A - Imprecise abort
+ CSPR->child(5)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 9) & 0x1)); // E - Data endianess
+ CSPR->child(6)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 10) & 0x3F)); // IT - If-Then state (DNM)
+ CSPR->child(7)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 16) & 0xF)); // GE - Greater-than-or-Equal
+ CSPR->child(8)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 20) & 0xF)); // DNM - Do not modify
+ CSPR->child(9)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 24) & 0x1)); // J - Java state
+ CSPR->child(10)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 27) & 0x1)); // Q - Sticky overflow
+ CSPR->child(11)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 28) & 0x1)); // V - Overflow
+ CSPR->child(12)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 29) & 0x1)); // C - Carry/Borrow/Extend
+ CSPR->child(13)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 30) & 0x1)); // Z - Zero
+ CSPR->child(14)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 31) & 0x1)); // N - Negative/Less than
}
diff --git a/src/citra_qt/disasm.cpp b/src/citra_qt/disasm.cpp
index ddcbf69d8..5f3a6058a 100644
--- a/src/citra_qt/disasm.cpp
+++ b/src/citra_qt/disasm.cpp
@@ -5,13 +5,14 @@
#include "bootmanager.hxx"
#include "hotkeys.hxx"
-#include "common.h"
-#include "mem_map.h"
+#include "common/common.h"
+#include "core/mem_map.h"
-#include "core.h"
-#include "break_points.h"
-#include "arm/interpreter/armdefs.h"
-#include "arm/disassembler/arm_disasm.h"
+#include "core/core.h"
+#include "common/break_points.h"
+#include "common/symbols.h"
+#include "core/arm/interpreter/armdefs.h"
+#include "core/arm/disassembler/arm_disasm.h"
GDisAsmView::GDisAsmView(QWidget* parent, EmuThread& emu_thread) : QDockWidget(parent), base_addr(0), emu_thread(emu_thread)
{
@@ -20,7 +21,7 @@ GDisAsmView::GDisAsmView(QWidget* parent, EmuThread& emu_thread) : QDockWidget(p
breakpoints = new BreakPoints();
model = new QStandardItemModel(this);
- model->setColumnCount(2);
+ model->setColumnCount(3);
disasm_ui.treeView->setModel(model);
RegisterHotkey("Disassembler", "Start/Stop", QKeySequence(Qt::Key_F5), Qt::ApplicationShortcut);
@@ -43,7 +44,7 @@ void GDisAsmView::Init()
{
ARM_Disasm* disasm = new ARM_Disasm();
- base_addr = Core::g_app_core->PC();
+ base_addr = Core::g_app_core->GetPC();
unsigned int curInstAddr = base_addr;
char result[255];
@@ -52,6 +53,13 @@ void GDisAsmView::Init()
disasm->disasm(curInstAddr, Memory::Read32(curInstAddr), result);
model->setItem(i, 0, new QStandardItem(QString("0x%1").arg((uint)(curInstAddr), 8, 16, QLatin1Char('0'))));
model->setItem(i, 1, new QStandardItem(QString(result)));
+ if (Symbols::HasSymbol(curInstAddr))
+ {
+ TSymbol symbol = Symbols::GetSymbol(curInstAddr);
+ model->setItem(i, 2, new QStandardItem(QString("%1 - Size:%2").arg(QString::fromStdString(symbol.name))
+ .arg(symbol.size / 4))); // divide by 4 to get instruction count
+
+ }
curInstAddr += 4;
}
disasm_ui.treeView->resizeColumnToContents(0);
@@ -112,7 +120,7 @@ void GDisAsmView::OnToggleStartStop()
void GDisAsmView::OnCPUStepped()
{
- ARMword next_instr = Core::g_app_core->PC();
+ ARMword next_instr = Core::g_app_core->GetPC();
if (breakpoints->IsAddressBreakPoint(next_instr))
{
diff --git a/src/citra_qt/disasm.hxx b/src/citra_qt/disasm.hxx
index 0e4a0fc3d..0c5a37cac 100644
--- a/src/citra_qt/disasm.hxx
+++ b/src/citra_qt/disasm.hxx
@@ -1,8 +1,8 @@
#include <QDockWidget>
#include "ui_disasm.h"
-#include "common.h"
-#include "break_points.h"
+#include "common/common.h"
+#include "common/break_points.h"
class QAction;
class QStandardItemModel;
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index d7104eb02..08fd03b24 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -4,8 +4,9 @@
#include "qhexedit.h"
#include "main.hxx"
-#include "common.h"
-#include "platform.h"
+#include "common/common.h"
+#include "common/platform.h"
+#include "common/log_manager.h"
#if EMU_PLATFORM == PLATFORM_LINUX
#include <unistd.h>
#endif
@@ -19,9 +20,9 @@
#include "callstack.hxx"
#include "ramview.hxx"
-#include "system.h"
-#include "loader.h"
-#include "core.h"
+#include "core/system.h"
+#include "core/loader.h"
+#include "core/core.h"
#include "version.h"
@@ -31,7 +32,9 @@ GMainWindow::GMainWindow()
statusBar()->hide();
render_window = new GRenderWindow;
- render_window->hide();
+ //render_window->setStyleSheet("background-color:black;");
+ ui.horizontalLayout->addWidget(render_window);
+ //render_window->hide();
disasm = new GDisAsmView(this, render_window->GetEmuThread());
addDockWidget(Qt::BottomDockWidgetArea, disasm);
@@ -63,15 +66,15 @@ GMainWindow::GMainWindow()
restoreState(settings.value("state").toByteArray());
render_window->restoreGeometry(settings.value("geometryRenderWindow").toByteArray());
- ui.action_Single_Window_Mode->setChecked(settings.value("singleWindowMode", false).toBool());
- SetupEmuWindowMode();
+ //ui.action_Popout_Window_Mode->setChecked(settings.value("popupWindowMode", false).toBool());
+ //ToggleWindowMode();
// Setup connections
connect(ui.action_load_elf, SIGNAL(triggered()), this, SLOT(OnMenuLoadELF()));
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()));
- connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(SetupEmuWindowMode()));
+ //connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(SetupEmuWindowMode()));
connect(ui.action_Hotkeys, SIGNAL(triggered()), this, SLOT(OnOpenHotkeysDialog()));
// BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views before the CPU continues
@@ -89,6 +92,7 @@ GMainWindow::GMainWindow()
show();
System::Init(render_window);
+ LogManager::Init();
}
GMainWindow::~GMainWindow()
@@ -124,9 +128,6 @@ void GMainWindow::BootGame(const char* filename)
arm_regs->OnCPUStepped();
render_window->GetEmuThread().start();
-
- SetupEmuWindowMode();
- render_window->show();
}
void GMainWindow::OnMenuLoadELF()
@@ -171,11 +172,11 @@ void GMainWindow::OnOpenHotkeysDialog()
}
-void GMainWindow::SetupEmuWindowMode()
+void GMainWindow::ToggleWindowMode()
{
//if (!render_window->GetEmuThread().isRunning())
// return;
-
+ /*
bool enable = ui.action_Single_Window_Mode->isChecked();
if (enable && render_window->parent() == NULL) // switch to single window mode
{
@@ -192,6 +193,7 @@ void GMainWindow::SetupEmuWindowMode()
render_window->DoneCurrent();
render_window->RestoreGeometry();
}
+ */
}
void GMainWindow::OnConfigure()
@@ -206,7 +208,7 @@ void GMainWindow::closeEvent(QCloseEvent* event)
settings.setValue("geometry", saveGeometry());
settings.setValue("state", saveState());
settings.setValue("geometryRenderWindow", render_window->saveGeometry());
- settings.setValue("singleWindowMode", ui.action_Single_Window_Mode->isChecked());
+ //settings.setValue("singleWindowMode", ui.action_Single_Window_Mode->isChecked());
settings.setValue("firstStart", false);
SaveHotkeys(settings);
diff --git a/src/citra_qt/main.hxx b/src/citra_qt/main.hxx
index 34bd2c3a4..401705698 100644
--- a/src/citra_qt/main.hxx
+++ b/src/citra_qt/main.hxx
@@ -37,8 +37,8 @@ private slots:
void OnStopGame();
void OnMenuLoadELF();
void OnOpenHotkeysDialog();
- void SetupEmuWindowMode();
void OnConfigure();
+ void ToggleWindowMode();
private:
Ui::MainWindow ui;
diff --git a/src/citra_qt/main.ui b/src/citra_qt/main.ui
index bc895d89c..d1362cdfc 100644
--- a/src/citra_qt/main.ui
+++ b/src/citra_qt/main.ui
@@ -57,7 +57,6 @@
<property name="title">
<string>&amp;View</string>
</property>
- <addaction name="action_Single_Window_Mode"/>
<addaction name="action_Hotkeys"/>
</widget>
<widget class="QMenu" name="menu_Help">
@@ -108,14 +107,6 @@
<string>About Citra</string>
</property>
</action>
- <action name="action_Single_Window_Mode">
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>Single Window Mode</string>
- </property>
- </action>
<action name="action_Hotkeys">
<property name="text">
<string>Configure &amp;Hotkeys ...</string>
diff --git a/src/citra_qt/qt-build.props b/src/citra_qt/qt-build.props
index d4600006c..b6a5025fb 100644
--- a/src/citra_qt/qt-build.props
+++ b/src/citra_qt/qt-build.props
@@ -1,4 +1,9 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2010 Daher Alfawares
+Licensed under GPLv2
+Refer to the license.txt file included.
+-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup
Condition="'$(UICBeforeTargets)' == '' and '$(UICAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
@@ -9,7 +14,7 @@
<UIC>
<QtUicExt>.hpp</QtUicExt>
<QtUicPrefix>ui_</QtUicPrefix>
- <CommandLineTemplate>%QTDIR%\bin\uic.exe [inputs] -o "[QtUicPrefix]%(FileName)[QtUicExt]"</CommandLineTemplate>
+ <CommandLineTemplate>$(QTDIR)\bin\uic.exe [inputs] -o "[QtUicPrefix]%(FileName)[QtUicExt]"</CommandLineTemplate>
<Outputs>[QtUicPrefix]%(FileName)[QtUicExt]</Outputs>
<ExecutionDescription>%(FileName).ui</ExecutionDescription>
</UIC>
@@ -33,7 +38,7 @@
<QtMocNoWarnings>False</QtMocNoWarnings>
<QtMocPfx>_moc</QtMocPfx>
<QtMocFilename>%(FileName)%(QtMocPfx)</QtMocFilename>
- <CommandLineTemplate>%QTDIR%\bin\moc.exe [QtMocNoWarnings] [QtCoreLib] [QtShared] [QtThread] [QtUnicode] [QtLargeFile] [QtKeywords] [QtOpenGLLib] [QtNoDebug] [QtGuiLib] -DWIN32 -D_MSC_VER=1500 -DWIN32 [Inputs] -o$(IntDir)%(QtMocFilename).cpp &amp;&amp; cl.exe $(IntDir)%(QtMocFilename).cpp [QtCommandLine] /c /Fo"$(IntDir)%(QtMocFilename).obj"</CommandLineTemplate>
+ <CommandLineTemplate>$(QTDIR)\bin\moc.exe [QtMocNoWarnings] [QtCoreLib] [QtShared] [QtThread] [QtUnicode] [QtLargeFile] [QtKeywords] [QtOpenGLLib] [QtNoDebug] [QtGuiLib] -DWIN32 -D_MSC_VER=1500 -DWIN32 [Inputs] -o$(IntDir)%(QtMocFilename).cpp &amp;&amp; cl.exe $(IntDir)%(QtMocFilename).cpp [QtCommandLine] /c /Fo"$(IntDir)%(QtMocFilename).obj"</CommandLineTemplate>
<Outputs>$(IntDir)%(QtMocFilename).obj</Outputs>
<ExecutionDescription>%(FileName).hxx</ExecutionDescription>
<ShowOnlyRuleProperties>true</ShowOnlyRuleProperties>
@@ -53,4 +58,4 @@
<ExecutionDescription>%(FileName).qrc</ExecutionDescription>
</QRC>
</ItemDefinitionGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/citra_qt/qt-build.targets b/src/citra_qt/qt-build.targets
index febec73c4..d0ae0d642 100644
--- a/src/citra_qt/qt-build.targets
+++ b/src/citra_qt/qt-build.targets
@@ -1,4 +1,9 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2010 Daher Alfawares
+Licensed under GPLv2
+Refer to the license.txt file included.
+-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PropertyPageSchema
@@ -239,4 +244,4 @@
<MakeDir
Directories="@(QRCDirsToMake-&gt;'%(RootDir)%(Directory)')" />
</Target>
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/citra_qt/qt-build.xml b/src/citra_qt/qt-build.xml
index 1bc84aa99..7a69f5a88 100644
--- a/src/citra_qt/qt-build.xml
+++ b/src/citra_qt/qt-build.xml
@@ -1,4 +1,9 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2010 Daher Alfawares
+Licensed under GPLv2
+Refer to the license.txt file included.
+-->
<ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:transformCallback="Microsoft.Cpp.Dev10.ConvertPropertyCallback" xmlns:impl="clr-namespace:Microsoft.VisualStudio.Project.Contracts.Implementation;assembly=Microsoft.VisualStudio.Project.Contracts.Implementation">
<Rule
Name="UIC"
@@ -483,4 +488,4 @@
Name="QRC"
DisplayName="Qt Resource Compiler"
ItemType="QRC" />
-</ProjectSchemaDefinitions> \ No newline at end of file
+</ProjectSchemaDefinitions>
diff --git a/src/citra_qt/ramview.cpp b/src/citra_qt/ramview.cpp
index 8cc252af6..3f899b95e 100644
--- a/src/citra_qt/ramview.cpp
+++ b/src/citra_qt/ramview.cpp
@@ -1,7 +1,7 @@
#include "ramview.hxx"
-#include "common.h"
-#include "memory.h"
+#include "common/common.h"
+#include "core/mem_map.h"
GRamView::GRamView(QWidget* parent) : QHexEdit(parent)
{
}
diff --git a/src/citra_qt/config/ui_controller_config.h b/src/citra_qt/ui_controller_config.h
index f84364a77..f84364a77 100644
--- a/src/citra_qt/config/ui_controller_config.h
+++ b/src/citra_qt/ui_controller_config.h
diff --git a/src/citra_qt/ui_gfx_fifo_player.h b/src/citra_qt/ui_gfx_fifo_player.h
deleted file mode 100644
index a65f56abd..000000000
--- a/src/citra_qt/ui_gfx_fifo_player.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/********************************************************************************
-** Form generated from reading UI file 'gfx_fifo_player.ui'
-**
-** Created by: Qt User Interface Compiler version 4.8.5
-**
-** WARNING! All changes made in this file will be lost when recompiling UI file!
-********************************************************************************/
-
-#ifndef UI_GFX_FIFO_PLAYER_H
-#define UI_GFX_FIFO_PLAYER_H
-
-#include <QtCore/QVariant>
-#include <QtGui/QAction>
-#include <QtGui/QApplication>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QCheckBox>
-#include <QtGui/QComboBox>
-#include <QtGui/QDockWidget>
-#include <QtGui/QGroupBox>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QHeaderView>
-#include <QtGui/QLabel>
-#include <QtGui/QPushButton>
-#include <QtGui/QRadioButton>
-#include <QtGui/QSpacerItem>
-#include <QtGui/QSpinBox>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QWidget>
-
-QT_BEGIN_NAMESPACE
-
-class Ui_GfxFifoPlayerControl
-{
-public:
- QWidget *recordingGroup;
- QVBoxLayout *verticalLayout;
- QGroupBox *groupBox;
- QVBoxLayout *verticalLayout_2;
- QRadioButton *stopManuallyButton;
- QHBoxLayout *horizontalLayout;
- QRadioButton *radioButton_2;
- QSpinBox *spinBox;
- QComboBox *comboBox;
- QSpacerItem *horizontalSpacer_2;
- QSpacerItem *horizontalSpacer;
- QCheckBox *pauseWhenDoneCheckbox;
- QHBoxLayout *horizontalLayout_2;
- QPushButton *startStopRecordingButton;
- QPushButton *saveRecordingButton;
- QGroupBox *playbackGroup;
- QVBoxLayout *verticalLayout_3;
- QHBoxLayout *horizontalLayout_3;
- QLabel *label;
- QComboBox *playbackSourceCombobox;
- QCheckBox *checkBox_2;
- QPushButton *startPlaybackButton;
- QSpacerItem *verticalSpacer;
-
- void setupUi(QDockWidget *GfxFifoPlayerControl)
- {
- if (GfxFifoPlayerControl->objectName().isEmpty())
- GfxFifoPlayerControl->setObjectName(QString::fromUtf8("GfxFifoPlayerControl"));
- GfxFifoPlayerControl->resize(275, 297);
- recordingGroup = new QWidget();
- recordingGroup->setObjectName(QString::fromUtf8("recordingGroup"));
- verticalLayout = new QVBoxLayout(recordingGroup);
- verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
- groupBox = new QGroupBox(recordingGroup);
- groupBox->setObjectName(QString::fromUtf8("groupBox"));
- verticalLayout_2 = new QVBoxLayout(groupBox);
- verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
- stopManuallyButton = new QRadioButton(groupBox);
- stopManuallyButton->setObjectName(QString::fromUtf8("stopManuallyButton"));
- stopManuallyButton->setChecked(true);
-
- verticalLayout_2->addWidget(stopManuallyButton);
-
- horizontalLayout = new QHBoxLayout();
- horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
- radioButton_2 = new QRadioButton(groupBox);
- radioButton_2->setObjectName(QString::fromUtf8("radioButton_2"));
-
- horizontalLayout->addWidget(radioButton_2);
-
- spinBox = new QSpinBox(groupBox);
- spinBox->setObjectName(QString::fromUtf8("spinBox"));
- spinBox->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
- spinBox->setMinimum(1);
- spinBox->setMaximum(99999);
-
- horizontalLayout->addWidget(spinBox);
-
- comboBox = new QComboBox(groupBox);
- comboBox->setObjectName(QString::fromUtf8("comboBox"));
-
- horizontalLayout->addWidget(comboBox);
-
- horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
-
- horizontalLayout->addItem(horizontalSpacer_2);
-
- horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
-
- horizontalLayout->addItem(horizontalSpacer);
-
-
- verticalLayout_2->addLayout(horizontalLayout);
-
- pauseWhenDoneCheckbox = new QCheckBox(groupBox);
- pauseWhenDoneCheckbox->setObjectName(QString::fromUtf8("pauseWhenDoneCheckbox"));
-
- verticalLayout_2->addWidget(pauseWhenDoneCheckbox);
-
- horizontalLayout_2 = new QHBoxLayout();
- horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
- startStopRecordingButton = new QPushButton(groupBox);
- startStopRecordingButton->setObjectName(QString::fromUtf8("startStopRecordingButton"));
-
- horizontalLayout_2->addWidget(startStopRecordingButton);
-
- saveRecordingButton = new QPushButton(groupBox);
- saveRecordingButton->setObjectName(QString::fromUtf8("saveRecordingButton"));
- saveRecordingButton->setEnabled(false);
-
- horizontalLayout_2->addWidget(saveRecordingButton);
-
-
- verticalLayout_2->addLayout(horizontalLayout_2);
-
-
- verticalLayout->addWidget(groupBox);
-
- playbackGroup = new QGroupBox(recordingGroup);
- playbackGroup->setObjectName(QString::fromUtf8("playbackGroup"));
- verticalLayout_3 = new QVBoxLayout(playbackGroup);
- verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
- horizontalLayout_3 = new QHBoxLayout();
- horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3"));
- label = new QLabel(playbackGroup);
- label->setObjectName(QString::fromUtf8("label"));
-
- horizontalLayout_3->addWidget(label);
-
- playbackSourceCombobox = new QComboBox(playbackGroup);
- playbackSourceCombobox->setObjectName(QString::fromUtf8("playbackSourceCombobox"));
-
- horizontalLayout_3->addWidget(playbackSourceCombobox);
-
-
- verticalLayout_3->addLayout(horizontalLayout_3);
-
- checkBox_2 = new QCheckBox(playbackGroup);
- checkBox_2->setObjectName(QString::fromUtf8("checkBox_2"));
-
- verticalLayout_3->addWidget(checkBox_2);
-
- startPlaybackButton = new QPushButton(playbackGroup);
- startPlaybackButton->setObjectName(QString::fromUtf8("startPlaybackButton"));
-
- verticalLayout_3->addWidget(startPlaybackButton);
-
- verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
-
- verticalLayout_3->addItem(verticalSpacer);
-
-
- verticalLayout->addWidget(playbackGroup);
-
- GfxFifoPlayerControl->setWidget(recordingGroup);
-
- retranslateUi(GfxFifoPlayerControl);
-
- QMetaObject::connectSlotsByName(GfxFifoPlayerControl);
- } // setupUi
-
- void retranslateUi(QDockWidget *GfxFifoPlayerControl)
- {
- GfxFifoPlayerControl->setWindowTitle(QApplication::translate("GfxFifoPlayerControl", "Fifo Player", 0, QApplication::UnicodeUTF8));
- groupBox->setTitle(QApplication::translate("GfxFifoPlayerControl", "Recording", 0, QApplication::UnicodeUTF8));
- stopManuallyButton->setText(QApplication::translate("GfxFifoPlayerControl", "Stop manually", 0, QApplication::UnicodeUTF8));
- radioButton_2->setText(QApplication::translate("GfxFifoPlayerControl", "Stop after", 0, QApplication::UnicodeUTF8));
- comboBox->clear();
- comboBox->insertItems(0, QStringList()
- << QApplication::translate("GfxFifoPlayerControl", "Frames", 0, QApplication::UnicodeUTF8)
- << QApplication::translate("GfxFifoPlayerControl", "Flushes", 0, QApplication::UnicodeUTF8)
- );
- pauseWhenDoneCheckbox->setText(QApplication::translate("GfxFifoPlayerControl", "Pause when done", 0, QApplication::UnicodeUTF8));
- startStopRecordingButton->setText(QApplication::translate("GfxFifoPlayerControl", "Start", 0, QApplication::UnicodeUTF8));
- saveRecordingButton->setText(QApplication::translate("GfxFifoPlayerControl", "Save to File...", 0, QApplication::UnicodeUTF8));
- playbackGroup->setTitle(QApplication::translate("GfxFifoPlayerControl", "Playback", 0, QApplication::UnicodeUTF8));
- label->setText(QApplication::translate("GfxFifoPlayerControl", "Playback source:", 0, QApplication::UnicodeUTF8));
- playbackSourceCombobox->clear();
- playbackSourceCombobox->insertItems(0, QStringList()
- << QApplication::translate("GfxFifoPlayerControl", "Last Recording", 0, QApplication::UnicodeUTF8)
- << QApplication::translate("GfxFifoPlayerControl", "From File...", 0, QApplication::UnicodeUTF8)
- );
- checkBox_2->setText(QApplication::translate("GfxFifoPlayerControl", "Loop", 0, QApplication::UnicodeUTF8));
- startPlaybackButton->setText(QApplication::translate("GfxFifoPlayerControl", "Start", 0, QApplication::UnicodeUTF8));
- } // retranslateUi
-
-};
-
-namespace Ui {
- class GfxFifoPlayerControl: public Ui_GfxFifoPlayerControl {};
-} // namespace Ui
-
-QT_END_NAMESPACE
-
-#endif // UI_GFX_FIFO_PLAYER_H
diff --git a/src/citra_qt/ui_image_info.h b/src/citra_qt/ui_image_info.h
deleted file mode 100644
index a6aaa3d8d..000000000
--- a/src/citra_qt/ui_image_info.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/********************************************************************************
-** Form generated from reading UI file 'image_info.ui'
-**
-** Created by: Qt User Interface Compiler version 4.8.5
-**
-** WARNING! All changes made in this file will be lost when recompiling UI file!
-********************************************************************************/
-
-#ifndef UI_IMAGE_INFO_H
-#define UI_IMAGE_INFO_H
-
-#include <QtCore/QVariant>
-#include <QtGui/QAction>
-#include <QtGui/QApplication>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QDockWidget>
-#include <QtGui/QFormLayout>
-#include <QtGui/QHeaderView>
-#include <QtGui/QLabel>
-#include <QtGui/QLineEdit>
-#include <QtGui/QPlainTextEdit>
-#include <QtGui/QWidget>
-
-QT_BEGIN_NAMESPACE
-
-class Ui_ImageInfo
-{
-public:
- QWidget *dockWidgetContents;
- QFormLayout *formLayout;
- QLabel *label_name;
- QLabel *label_gameid;
- QLabel *label_country;
- QLabel *label_bannertext;
- QLineEdit *line_name;
- QLineEdit *line_gameid;
- QLineEdit *line_country;
- QLabel *label_banner;
- QLabel *label_developer;
- QLineEdit *line_developer;
- QLabel *label_description;
- QPlainTextEdit *edit_description;
-
- void setupUi(QDockWidget *ImageInfo)
- {
- if (ImageInfo->objectName().isEmpty())
- ImageInfo->setObjectName(QString::fromUtf8("ImageInfo"));
- ImageInfo->resize(400, 300);
- dockWidgetContents = new QWidget();
- dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents"));
- formLayout = new QFormLayout(dockWidgetContents);
- formLayout->setObjectName(QString::fromUtf8("formLayout"));
- label_name = new QLabel(dockWidgetContents);
- label_name->setObjectName(QString::fromUtf8("label_name"));
-
- formLayout->setWidget(1, QFormLayout::LabelRole, label_name);
-
- label_gameid = new QLabel(dockWidgetContents);
- label_gameid->setObjectName(QString::fromUtf8("label_gameid"));
-
- formLayout->setWidget(4, QFormLayout::LabelRole, label_gameid);
-
- label_country = new QLabel(dockWidgetContents);
- label_country->setObjectName(QString::fromUtf8("label_country"));
-
- formLayout->setWidget(5, QFormLayout::LabelRole, label_country);
-
- label_bannertext = new QLabel(dockWidgetContents);
- label_bannertext->setObjectName(QString::fromUtf8("label_bannertext"));
-
- formLayout->setWidget(9, QFormLayout::LabelRole, label_bannertext);
-
- line_name = new QLineEdit(dockWidgetContents);
- line_name->setObjectName(QString::fromUtf8("line_name"));
- line_name->setEnabled(true);
- line_name->setReadOnly(true);
-
- formLayout->setWidget(1, QFormLayout::FieldRole, line_name);
-
- line_gameid = new QLineEdit(dockWidgetContents);
- line_gameid->setObjectName(QString::fromUtf8("line_gameid"));
- line_gameid->setEnabled(true);
- line_gameid->setReadOnly(true);
-
- formLayout->setWidget(4, QFormLayout::FieldRole, line_gameid);
-
- line_country = new QLineEdit(dockWidgetContents);
- line_country->setObjectName(QString::fromUtf8("line_country"));
- line_country->setEnabled(true);
- line_country->setReadOnly(true);
-
- formLayout->setWidget(5, QFormLayout::FieldRole, line_country);
-
- label_banner = new QLabel(dockWidgetContents);
- label_banner->setObjectName(QString::fromUtf8("label_banner"));
- label_banner->setAlignment(Qt::AlignCenter);
-
- formLayout->setWidget(9, QFormLayout::FieldRole, label_banner);
-
- label_developer = new QLabel(dockWidgetContents);
- label_developer->setObjectName(QString::fromUtf8("label_developer"));
-
- formLayout->setWidget(3, QFormLayout::LabelRole, label_developer);
-
- line_developer = new QLineEdit(dockWidgetContents);
- line_developer->setObjectName(QString::fromUtf8("line_developer"));
- line_developer->setReadOnly(true);
-
- formLayout->setWidget(3, QFormLayout::FieldRole, line_developer);
-
- label_description = new QLabel(dockWidgetContents);
- label_description->setObjectName(QString::fromUtf8("label_description"));
-
- formLayout->setWidget(7, QFormLayout::LabelRole, label_description);
-
- edit_description = new QPlainTextEdit(dockWidgetContents);
- edit_description->setObjectName(QString::fromUtf8("edit_description"));
- edit_description->setMaximumSize(QSize(16777215, 80));
- edit_description->setReadOnly(true);
- edit_description->setPlainText(QString::fromUtf8(""));
-
- formLayout->setWidget(7, QFormLayout::FieldRole, edit_description);
-
- ImageInfo->setWidget(dockWidgetContents);
-
- retranslateUi(ImageInfo);
-
- QMetaObject::connectSlotsByName(ImageInfo);
- } // setupUi
-
- void retranslateUi(QDockWidget *ImageInfo)
- {
- ImageInfo->setWindowTitle(QApplication::translate("ImageInfo", "Image Info", 0, QApplication::UnicodeUTF8));
- label_name->setText(QApplication::translate("ImageInfo", "Name", 0, QApplication::UnicodeUTF8));
- label_gameid->setText(QApplication::translate("ImageInfo", "Game ID", 0, QApplication::UnicodeUTF8));
- label_country->setText(QApplication::translate("ImageInfo", "Country", 0, QApplication::UnicodeUTF8));
- label_bannertext->setText(QApplication::translate("ImageInfo", "Banner", 0, QApplication::UnicodeUTF8));
- line_name->setText(QString());
- line_gameid->setText(QString());
- line_country->setText(QApplication::translate("ImageInfo", "EUROPE", 0, QApplication::UnicodeUTF8));
- label_banner->setText(QString());
- label_developer->setText(QApplication::translate("ImageInfo", "Developer", 0, QApplication::UnicodeUTF8));
- label_description->setText(QApplication::translate("ImageInfo", "Description", 0, QApplication::UnicodeUTF8));
- } // retranslateUi
-
-};
-
-namespace Ui {
- class ImageInfo: public Ui_ImageInfo {};
-} // namespace Ui
-
-QT_END_NAMESPACE
-
-#endif // UI_IMAGE_INFO_H
diff --git a/src/citra_qt/ui_main.h b/src/citra_qt/ui_main.h
index d349a5c6a..e098c45a6 100644
--- a/src/citra_qt/ui_main.h
+++ b/src/citra_qt/ui_main.h
@@ -32,7 +32,6 @@ public:
QAction *action_Pause;
QAction *action_Stop;
QAction *action_About;
- QAction *action_Single_Window_Mode;
QAction *action_Hotkeys;
QAction *action_Configure;
QWidget *centralwidget;
@@ -68,9 +67,6 @@ public:
action_Stop->setEnabled(false);
action_About = new QAction(MainWindow);
action_About->setObjectName(QString::fromUtf8("action_About"));
- action_Single_Window_Mode = new QAction(MainWindow);
- action_Single_Window_Mode->setObjectName(QString::fromUtf8("action_Single_Window_Mode"));
- action_Single_Window_Mode->setCheckable(true);
action_Hotkeys = new QAction(MainWindow);
action_Hotkeys->setObjectName(QString::fromUtf8("action_Hotkeys"));
action_Configure = new QAction(MainWindow);
@@ -108,7 +104,6 @@ public:
menu_Emulation->addAction(action_Stop);
menu_Emulation->addSeparator();
menu_Emulation->addAction(action_Configure);
- menu_View->addAction(action_Single_Window_Mode);
menu_View->addAction(action_Hotkeys);
menu_Help->addAction(action_About);
@@ -128,7 +123,6 @@ public:
action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 0, QApplication::UnicodeUTF8));
action_Stop->setText(QApplication::translate("MainWindow", "&Stop", 0, QApplication::UnicodeUTF8));
action_About->setText(QApplication::translate("MainWindow", "About Citra", 0, QApplication::UnicodeUTF8));
- action_Single_Window_Mode->setText(QApplication::translate("MainWindow", "Single Window Mode", 0, QApplication::UnicodeUTF8));
action_Hotkeys->setText(QApplication::translate("MainWindow", "Configure &Hotkeys ...", 0, QApplication::UnicodeUTF8));
action_Configure->setText(QApplication::translate("MainWindow", "Configure ...", 0, QApplication::UnicodeUTF8));
menu_File->setTitle(QApplication::translate("MainWindow", "&File", 0, QApplication::UnicodeUTF8));
diff --git a/src/citra_qt/ui_welcome_wizard.h b/src/citra_qt/ui_welcome_wizard.h
deleted file mode 100644
index 0cc5ceb49..000000000
--- a/src/citra_qt/ui_welcome_wizard.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/********************************************************************************
-** Form generated from reading UI file 'welcome_wizard.ui'
-**
-** Created by: Qt User Interface Compiler version 4.8.5
-**
-** WARNING! All changes made in this file will be lost when recompiling UI file!
-********************************************************************************/
-
-#ifndef UI_WELCOME_WIZARD_H
-#define UI_WELCOME_WIZARD_H
-
-#include <QtCore/QVariant>
-#include <QtGui/QAction>
-#include <QtGui/QApplication>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QHeaderView>
-#include <QtGui/QLineEdit>
-#include <QtGui/QPushButton>
-#include <QtGui/QSpacerItem>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QWizard>
-#include <QtGui/QWizardPage>
-#include "path_list.hxx"
-
-QT_BEGIN_NAMESPACE
-
-class Ui_WelcomeWizard
-{
-public:
- QWizardPage *wizardPage1;
- QWizardPage *wizardPage2;
- QVBoxLayout *verticalLayout_2;
- QHBoxLayout *horizontalLayout;
- QLineEdit *edit_path;
- QPushButton *button_browse_path;
- QHBoxLayout *horizontalLayout_2;
- GPathList *path_list;
- QVBoxLayout *verticalLayout_3;
- QPushButton *button_add_path;
- QSpacerItem *verticalSpacer;
-
- void setupUi(QWizard *WelcomeWizard)
- {
- if (WelcomeWizard->objectName().isEmpty())
- WelcomeWizard->setObjectName(QString::fromUtf8("WelcomeWizard"));
- WelcomeWizard->resize(510, 300);
- WelcomeWizard->setModal(true);
- wizardPage1 = new QWizardPage();
- wizardPage1->setObjectName(QString::fromUtf8("wizardPage1"));
- WelcomeWizard->addPage(wizardPage1);
- wizardPage2 = new QWizardPage();
- wizardPage2->setObjectName(QString::fromUtf8("wizardPage2"));
- verticalLayout_2 = new QVBoxLayout(wizardPage2);
- verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
- horizontalLayout = new QHBoxLayout();
- horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
- edit_path = new QLineEdit(wizardPage2);
- edit_path->setObjectName(QString::fromUtf8("edit_path"));
- edit_path->setReadOnly(true);
-
- horizontalLayout->addWidget(edit_path);
-
- button_browse_path = new QPushButton(wizardPage2);
- button_browse_path->setObjectName(QString::fromUtf8("button_browse_path"));
-
- horizontalLayout->addWidget(button_browse_path);
-
-
- verticalLayout_2->addLayout(horizontalLayout);
-
- horizontalLayout_2 = new QHBoxLayout();
- horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
- path_list = new GPathList(wizardPage2);
- path_list->setObjectName(QString::fromUtf8("path_list"));
-
- horizontalLayout_2->addWidget(path_list);
-
- verticalLayout_3 = new QVBoxLayout();
- verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
- button_add_path = new QPushButton(wizardPage2);
- button_add_path->setObjectName(QString::fromUtf8("button_add_path"));
-
- verticalLayout_3->addWidget(button_add_path);
-
- verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
-
- verticalLayout_3->addItem(verticalSpacer);
-
-
- horizontalLayout_2->addLayout(verticalLayout_3);
-
-
- verticalLayout_2->addLayout(horizontalLayout_2);
-
- WelcomeWizard->addPage(wizardPage2);
-
- retranslateUi(WelcomeWizard);
-
- QMetaObject::connectSlotsByName(WelcomeWizard);
- } // setupUi
-
- void retranslateUi(QWizard *WelcomeWizard)
- {
- WelcomeWizard->setWindowTitle(QApplication::translate("WelcomeWizard", "Welcome", 0, QApplication::UnicodeUTF8));
- wizardPage1->setTitle(QApplication::translate("WelcomeWizard", "Welcome", 0, QApplication::UnicodeUTF8));
- wizardPage1->setSubTitle(QApplication::translate("WelcomeWizard", "This wizard will guide you through the initial configuration.", 0, QApplication::UnicodeUTF8));
- wizardPage2->setTitle(QApplication::translate("WelcomeWizard", "ISO paths", 0, QApplication::UnicodeUTF8));
- wizardPage2->setSubTitle(QApplication::translate("WelcomeWizard", "If you have a collection of game images, you can add them to the path list here. Gekko will automatically show a list of your collection on startup then.", 0, QApplication::UnicodeUTF8));
- edit_path->setText(QString());
- edit_path->setPlaceholderText(QApplication::translate("WelcomeWizard", "Select a path to add ...", 0, QApplication::UnicodeUTF8));
- button_browse_path->setText(QString());
- button_add_path->setText(QString());
- } // retranslateUi
-
-};
-
-namespace Ui {
- class WelcomeWizard: public Ui_WelcomeWizard {};
-} // namespace Ui
-
-QT_END_NAMESPACE
-
-#endif // UI_WELCOME_WIZARD_H
diff --git a/src/common/common.vcxproj b/src/common/common.vcxproj
index 32d735a09..202d00d18 100644
--- a/src/common/common.vcxproj
+++ b/src/common/common.vcxproj
@@ -186,6 +186,7 @@
<ClInclude Include="std_thread.h" />
<ClInclude Include="string_util.h" />
<ClInclude Include="swap.h" />
+ <ClInclude Include="symbols.h" />
<ClInclude Include="thread.h" />
<ClInclude Include="thunk.h" />
<ClInclude Include="timer.h" />
@@ -205,6 +206,7 @@
<ClCompile Include="misc.cpp" />
<ClCompile Include="msg_handler.cpp" />
<ClCompile Include="string_util.cpp" />
+ <ClCompile Include="symbols.cpp" />
<ClCompile Include="thread.cpp" />
<ClCompile Include="timer.cpp" />
<ClCompile Include="utf8.cpp" />
diff --git a/src/common/common.vcxproj.filters b/src/common/common.vcxproj.filters
index 3bdaa973f..bd4d27b58 100644
--- a/src/common/common.vcxproj.filters
+++ b/src/common/common.vcxproj.filters
@@ -37,6 +37,7 @@
<ClInclude Include="thunk.h" />
<ClInclude Include="timer.h" />
<ClInclude Include="utf8.h" />
+ <ClInclude Include="symbols.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="break_points.cpp" />
@@ -56,6 +57,7 @@
<ClCompile Include="timer.cpp" />
<ClCompile Include="utf8.cpp" />
<ClCompile Include="version.cpp" />
+ <ClCompile Include="symbols.cpp" />
</ItemGroup>
<ItemGroup>
<Text Include="CMakeLists.txt" />
diff --git a/src/common/symbols.cpp b/src/common/symbols.cpp
new file mode 100644
index 000000000..dcc9eeac5
--- /dev/null
+++ b/src/common/symbols.cpp
@@ -0,0 +1,57 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2
+// Refer to the license.txt file included.
+
+#include "common/symbols.h"
+
+TSymbolsMap g_symbols;
+
+namespace Symbols
+{
+ bool HasSymbol(u32 _address)
+ {
+ return g_symbols.find(_address) != g_symbols.end();
+ }
+
+ void Add(u32 _address, const std::string& _name, u32 _size, u32 _type)
+ {
+ if (!HasSymbol(_address))
+ {
+ TSymbol symbol;
+ symbol.address = _address;
+ symbol.name = _name;
+ symbol.size = _size;
+ symbol.type = _type;
+
+ g_symbols.insert(TSymbolsPair(_address, symbol));
+ }
+ }
+
+ TSymbol GetSymbol(u32 _address)
+ {
+ TSymbolsMap::iterator foundSymbolItr;
+ TSymbol symbol;
+
+ foundSymbolItr = g_symbols.find(_address);
+ if (foundSymbolItr != g_symbols.end())
+ {
+ symbol = (*foundSymbolItr).second;
+ }
+
+ return symbol;
+ }
+ const std::string& GetName(u32 _address)
+ {
+ return GetSymbol(_address).name;
+ }
+
+ void Remove(u32 _address)
+ {
+ g_symbols.erase(_address);
+ }
+
+ void Clear()
+ {
+ g_symbols.clear();
+ }
+} \ No newline at end of file
diff --git a/src/common/symbols.h b/src/common/symbols.h
new file mode 100644
index 000000000..b76749654
--- /dev/null
+++ b/src/common/symbols.h
@@ -0,0 +1,39 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <map>
+
+#include "common/common.h"
+
+class DebugInterface;
+
+struct TSymbol
+{
+ TSymbol() :
+ address(0),
+ size(0),
+ type(0)
+ {}
+ u32 address;
+ std::string name;
+ u32 size;
+ u32 type;
+};
+
+typedef std::map<u32, TSymbol> TSymbolsMap;
+typedef std::pair<u32, TSymbol> TSymbolsPair;
+
+namespace Symbols
+{
+ bool HasSymbol(u32 _address);
+
+ void Add(u32 _address, const std::string& _name, u32 _size, u32 _type);
+ TSymbol GetSymbol(u32 _address);
+ const std::string& GetName(u32 _address);
+ void Remove(u32 _address);
+ void Clear();
+};
+
diff --git a/src/core/elf/elf_reader.cpp b/src/core/elf/elf_reader.cpp
index 2b03caa0f..c62332cec 100644
--- a/src/core/elf/elf_reader.cpp
+++ b/src/core/elf/elf_reader.cpp
@@ -6,13 +6,10 @@
#include "common/common.h"
+#include "common/symbols.h"
#include "core/mem_map.h"
#include "core/elf/elf_reader.h"
-//#include "Core/Debugger/Debugger_SymbolMap.h"
-//#include "Core/HW/Memmap.h"
-//#include "Core/PowerPC/PPCSymbolDB.h"
-
//void bswap(Elf32_Word &w) {w = Common::swap32(w);}
//void bswap(Elf32_Half &w) {w = Common::swap16(w);}
@@ -71,16 +68,9 @@ ElfReader::ElfReader(void *ptr)
segments = (Elf32_Phdr *)(base + header->e_phoff);
sections = (Elf32_Shdr *)(base + header->e_shoff);
- //for (int i = 0; i < GetNumSegments(); i++)
- //{
- // byteswapSegment(segments[i]);
- //}
-
- //for (int i = 0; i < GetNumSections(); i++)
- //{
- // byteswapSection(sections[i]);
- //}
entryPoint = header->e_entry;
+
+ LoadSymbols();
}
const char *ElfReader::GetSectionName(int section) const
@@ -101,9 +91,6 @@ bool ElfReader::LoadInto(u32 vaddr)
{
DEBUG_LOG(MASTER_LOG,"String section: %i", header->e_shstrndx);
-// sectionOffsets = new u32[GetNumSections()];
-// sectionAddrs = new u32[GetNumSections()];
-
// Should we relocate?
bRelocate = (header->e_type != ET_EXEC);
@@ -153,30 +140,8 @@ bool ElfReader::LoadInto(u32 vaddr)
}
}
- /*
- LOG(MASTER_LOG,"%i sections:", header->e_shnum);
-
- for (int i=0; i<GetNumSections(); i++)
- {
- Elf32_Shdr *s = &sections[i];
- const char *name = GetSectionName(i);
- u32 writeAddr = s->sh_addr + baseAddress;
- sectionOffsets[i] = writeAddr - vaddr;
- sectionAddrs[i] = writeAddr;
-
- if (s->sh_flags & SHF_ALLOC)
- {
- LOG(MASTER_LOG,"Data Section found: %s Sitting at %08x, size %08x", name, writeAddr, s->sh_size);
-
- }
- else
- {
- LOG(MASTER_LOG,"NonData Section found: %s Ignoring (size=%08x) (flags=%08x)", name, s->sh_size, s->sh_flags);
- }
- }
-*/
- INFO_LOG(MASTER_LOG,"Done loading.");
+ INFO_LOG(MASTER_LOG,"Done loading.");
return true;
}
@@ -192,8 +157,6 @@ SectionID ElfReader::GetSectionByName(const char *name, int firstSection) const
return -1;
}
-/* TODO(bunnei): The following is verbatim from Dolphin - needs to be updated for this project:
-
bool ElfReader::LoadSymbols()
{
bool hasSymbols = false;
@@ -208,33 +171,20 @@ bool ElfReader::LoadSymbols()
int numSymbols = sections[sec].sh_size / sizeof(Elf32_Sym);
for (int sym = 0; sym < numSymbols; sym++)
{
- int size = Common::swap32(symtab[sym].st_size);
+ int size = symtab[sym].st_size;
if (size == 0)
continue;
// int bind = symtab[sym].st_info >> 4;
int type = symtab[sym].st_info & 0xF;
- int sectionIndex = Common::swap16(symtab[sym].st_shndx);
- int value = Common::swap32(symtab[sym].st_value);
- const char *name = stringBase + Common::swap32(symtab[sym].st_name);
- if (bRelocate)
- value += sectionAddrs[sectionIndex];
-
- int symtype = Symbol::SYMBOL_DATA;
- switch (type)
- {
- case STT_OBJECT:
- symtype = Symbol::SYMBOL_DATA; break;
- case STT_FUNC:
- symtype = Symbol::SYMBOL_FUNCTION; break;
- default:
- continue;
- }
- g_symbolDB.AddKnownSymbol(value, size, name, symtype);
- hasSymbols = true;
+
+ const char *name = stringBase + symtab[sym].st_name;
+
+ Symbols::Add(symtab[sym].st_value, name, size, type);
+
+ hasSymbols = true;
}
}
- g_symbolDB.Index();
- return hasSymbols;
+
+ return hasSymbols;
}
-*/