summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/citra_qt/bootmanager.cpp7
-rw-r--r--src/citra_qt/main.cpp22
-rw-r--r--src/citra_qt/main.hxx2
-rw-r--r--src/citra_qt/main.ui9
-rw-r--r--src/citra_qt/ui_main.h6
5 files changed, 17 insertions, 29 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp
index 75abcd8bf..31958ac28 100644
--- a/src/citra_qt/bootmanager.cpp
+++ b/src/citra_qt/bootmanager.cpp
@@ -6,6 +6,7 @@
6 6
7#include "core/core.h" 7#include "core/core.h"
8#include "core/loader.h" 8#include "core/loader.h"
9#include "video_core/video_core.h"
9 10
10#include "version.h" 11#include "version.h"
11 12
@@ -35,7 +36,8 @@ void EmuThread::run()
35 exec_cpu_step = false; 36 exec_cpu_step = false;
36 37
37 Core::SingleStep(); 38 Core::SingleStep();
38 emit CPUStepped(); 39 if (!cpu_running)
40 emit CPUStepped();
39 } 41 }
40 } 42 }
41 } 43 }
@@ -103,9 +105,8 @@ GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this
103 // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose 105 // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose
104 106
105 child = new GGLWidgetInternal(this); 107 child = new GGLWidgetInternal(this);
106
107 QBoxLayout* layout = new QHBoxLayout(this); 108 QBoxLayout* layout = new QHBoxLayout(this);
108 resize(640, 480); // TODO: Load size from config instead 109 resize(VideoCore::kScreenTopWidth, VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight);
109 layout->addWidget(child); 110 layout->addWidget(child);
110 layout->setMargin(0); 111 layout->setMargin(0);
111 setLayout(layout); 112 setLayout(layout);
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index c022c28ab..08fd03b24 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -6,6 +6,7 @@
6 6
7#include "common/common.h" 7#include "common/common.h"
8#include "common/platform.h" 8#include "common/platform.h"
9#include "common/log_manager.h"
9#if EMU_PLATFORM == PLATFORM_LINUX 10#if EMU_PLATFORM == PLATFORM_LINUX
10#include <unistd.h> 11#include <unistd.h>
11#endif 12#endif
@@ -31,7 +32,9 @@ GMainWindow::GMainWindow()
31 statusBar()->hide(); 32 statusBar()->hide();
32 33
33 render_window = new GRenderWindow; 34 render_window = new GRenderWindow;
34 render_window->hide(); 35 //render_window->setStyleSheet("background-color:black;");
36 ui.horizontalLayout->addWidget(render_window);
37 //render_window->hide();
35 38
36 disasm = new GDisAsmView(this, render_window->GetEmuThread()); 39 disasm = new GDisAsmView(this, render_window->GetEmuThread());
37 addDockWidget(Qt::BottomDockWidgetArea, disasm); 40 addDockWidget(Qt::BottomDockWidgetArea, disasm);
@@ -63,15 +66,15 @@ GMainWindow::GMainWindow()
63 restoreState(settings.value("state").toByteArray()); 66 restoreState(settings.value("state").toByteArray());
64 render_window->restoreGeometry(settings.value("geometryRenderWindow").toByteArray()); 67 render_window->restoreGeometry(settings.value("geometryRenderWindow").toByteArray());
65 68
66 ui.action_Single_Window_Mode->setChecked(settings.value("singleWindowMode", false).toBool()); 69 //ui.action_Popout_Window_Mode->setChecked(settings.value("popupWindowMode", false).toBool());
67 SetupEmuWindowMode(); 70 //ToggleWindowMode();
68 71
69 // Setup connections 72 // Setup connections
70 connect(ui.action_load_elf, SIGNAL(triggered()), this, SLOT(OnMenuLoadELF())); 73 connect(ui.action_load_elf, SIGNAL(triggered()), this, SLOT(OnMenuLoadELF()));
71 connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame())); 74 connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame()));
72 connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame())); 75 connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame()));
73 connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame())); 76 connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame()));
74 connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(SetupEmuWindowMode())); 77 //connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(SetupEmuWindowMode()));
75 connect(ui.action_Hotkeys, SIGNAL(triggered()), this, SLOT(OnOpenHotkeysDialog())); 78 connect(ui.action_Hotkeys, SIGNAL(triggered()), this, SLOT(OnOpenHotkeysDialog()));
76 79
77 // BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views before the CPU continues 80 // BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views before the CPU continues
@@ -89,6 +92,7 @@ GMainWindow::GMainWindow()
89 show(); 92 show();
90 93
91 System::Init(render_window); 94 System::Init(render_window);
95 LogManager::Init();
92} 96}
93 97
94GMainWindow::~GMainWindow() 98GMainWindow::~GMainWindow()
@@ -124,9 +128,6 @@ void GMainWindow::BootGame(const char* filename)
124 arm_regs->OnCPUStepped(); 128 arm_regs->OnCPUStepped();
125 129
126 render_window->GetEmuThread().start(); 130 render_window->GetEmuThread().start();
127
128 SetupEmuWindowMode();
129 render_window->show();
130} 131}
131 132
132void GMainWindow::OnMenuLoadELF() 133void GMainWindow::OnMenuLoadELF()
@@ -171,11 +172,11 @@ void GMainWindow::OnOpenHotkeysDialog()
171} 172}
172 173
173 174
174void GMainWindow::SetupEmuWindowMode() 175void GMainWindow::ToggleWindowMode()
175{ 176{
176 //if (!render_window->GetEmuThread().isRunning()) 177 //if (!render_window->GetEmuThread().isRunning())
177 // return; 178 // return;
178 179 /*
179 bool enable = ui.action_Single_Window_Mode->isChecked(); 180 bool enable = ui.action_Single_Window_Mode->isChecked();
180 if (enable && render_window->parent() == NULL) // switch to single window mode 181 if (enable && render_window->parent() == NULL) // switch to single window mode
181 { 182 {
@@ -192,6 +193,7 @@ void GMainWindow::SetupEmuWindowMode()
192 render_window->DoneCurrent(); 193 render_window->DoneCurrent();
193 render_window->RestoreGeometry(); 194 render_window->RestoreGeometry();
194 } 195 }
196 */
195} 197}
196 198
197void GMainWindow::OnConfigure() 199void GMainWindow::OnConfigure()
@@ -206,7 +208,7 @@ void GMainWindow::closeEvent(QCloseEvent* event)
206 settings.setValue("geometry", saveGeometry()); 208 settings.setValue("geometry", saveGeometry());
207 settings.setValue("state", saveState()); 209 settings.setValue("state", saveState());
208 settings.setValue("geometryRenderWindow", render_window->saveGeometry()); 210 settings.setValue("geometryRenderWindow", render_window->saveGeometry());
209 settings.setValue("singleWindowMode", ui.action_Single_Window_Mode->isChecked()); 211 //settings.setValue("singleWindowMode", ui.action_Single_Window_Mode->isChecked());
210 settings.setValue("firstStart", false); 212 settings.setValue("firstStart", false);
211 SaveHotkeys(settings); 213 SaveHotkeys(settings);
212 214
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:
37 void OnStopGame(); 37 void OnStopGame();
38 void OnMenuLoadELF(); 38 void OnMenuLoadELF();
39 void OnOpenHotkeysDialog(); 39 void OnOpenHotkeysDialog();
40 void SetupEmuWindowMode();
41 void OnConfigure(); 40 void OnConfigure();
41 void ToggleWindowMode();
42 42
43private: 43private:
44 Ui::MainWindow ui; 44 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 @@
57 <property name="title"> 57 <property name="title">
58 <string>&amp;View</string> 58 <string>&amp;View</string>
59 </property> 59 </property>
60 <addaction name="action_Single_Window_Mode"/>
61 <addaction name="action_Hotkeys"/> 60 <addaction name="action_Hotkeys"/>
62 </widget> 61 </widget>
63 <widget class="QMenu" name="menu_Help"> 62 <widget class="QMenu" name="menu_Help">
@@ -108,14 +107,6 @@
108 <string>About Citra</string> 107 <string>About Citra</string>
109 </property> 108 </property>
110 </action> 109 </action>
111 <action name="action_Single_Window_Mode">
112 <property name="checkable">
113 <bool>true</bool>
114 </property>
115 <property name="text">
116 <string>Single Window Mode</string>
117 </property>
118 </action>
119 <action name="action_Hotkeys"> 110 <action name="action_Hotkeys">
120 <property name="text"> 111 <property name="text">
121 <string>Configure &amp;Hotkeys ...</string> 112 <string>Configure &amp;Hotkeys ...</string>
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:
32 QAction *action_Pause; 32 QAction *action_Pause;
33 QAction *action_Stop; 33 QAction *action_Stop;
34 QAction *action_About; 34 QAction *action_About;
35 QAction *action_Single_Window_Mode;
36 QAction *action_Hotkeys; 35 QAction *action_Hotkeys;
37 QAction *action_Configure; 36 QAction *action_Configure;
38 QWidget *centralwidget; 37 QWidget *centralwidget;
@@ -68,9 +67,6 @@ public:
68 action_Stop->setEnabled(false); 67 action_Stop->setEnabled(false);
69 action_About = new QAction(MainWindow); 68 action_About = new QAction(MainWindow);
70 action_About->setObjectName(QString::fromUtf8("action_About")); 69 action_About->setObjectName(QString::fromUtf8("action_About"));
71 action_Single_Window_Mode = new QAction(MainWindow);
72 action_Single_Window_Mode->setObjectName(QString::fromUtf8("action_Single_Window_Mode"));
73 action_Single_Window_Mode->setCheckable(true);
74 action_Hotkeys = new QAction(MainWindow); 70 action_Hotkeys = new QAction(MainWindow);
75 action_Hotkeys->setObjectName(QString::fromUtf8("action_Hotkeys")); 71 action_Hotkeys->setObjectName(QString::fromUtf8("action_Hotkeys"));
76 action_Configure = new QAction(MainWindow); 72 action_Configure = new QAction(MainWindow);
@@ -108,7 +104,6 @@ public:
108 menu_Emulation->addAction(action_Stop); 104 menu_Emulation->addAction(action_Stop);
109 menu_Emulation->addSeparator(); 105 menu_Emulation->addSeparator();
110 menu_Emulation->addAction(action_Configure); 106 menu_Emulation->addAction(action_Configure);
111 menu_View->addAction(action_Single_Window_Mode);
112 menu_View->addAction(action_Hotkeys); 107 menu_View->addAction(action_Hotkeys);
113 menu_Help->addAction(action_About); 108 menu_Help->addAction(action_About);
114 109
@@ -128,7 +123,6 @@ public:
128 action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 0, QApplication::UnicodeUTF8)); 123 action_Pause->setText(QApplication::translate("MainWindow", "&Pause", 0, QApplication::UnicodeUTF8));
129 action_Stop->setText(QApplication::translate("MainWindow", "&Stop", 0, QApplication::UnicodeUTF8)); 124 action_Stop->setText(QApplication::translate("MainWindow", "&Stop", 0, QApplication::UnicodeUTF8));
130 action_About->setText(QApplication::translate("MainWindow", "About Citra", 0, QApplication::UnicodeUTF8)); 125 action_About->setText(QApplication::translate("MainWindow", "About Citra", 0, QApplication::UnicodeUTF8));
131 action_Single_Window_Mode->setText(QApplication::translate("MainWindow", "Single Window Mode", 0, QApplication::UnicodeUTF8));
132 action_Hotkeys->setText(QApplication::translate("MainWindow", "Configure &Hotkeys ...", 0, QApplication::UnicodeUTF8)); 126 action_Hotkeys->setText(QApplication::translate("MainWindow", "Configure &Hotkeys ...", 0, QApplication::UnicodeUTF8));
133 action_Configure->setText(QApplication::translate("MainWindow", "Configure ...", 0, QApplication::UnicodeUTF8)); 127 action_Configure->setText(QApplication::translate("MainWindow", "Configure ...", 0, QApplication::UnicodeUTF8));
134 menu_File->setTitle(QApplication::translate("MainWindow", "&File", 0, QApplication::UnicodeUTF8)); 128 menu_File->setTitle(QApplication::translate("MainWindow", "&File", 0, QApplication::UnicodeUTF8));