summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/bootmanager.cpp12
-rw-r--r--src/citra_qt/bootmanager.h6
2 files changed, 13 insertions, 5 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp
index 7a1360d34..bb9b204f3 100644
--- a/src/citra_qt/bootmanager.cpp
+++ b/src/citra_qt/bootmanager.cpp
@@ -128,9 +128,6 @@ GRenderWindow::GRenderWindow(QWidget* parent, EmuThread* emu_thread) :
128 128
129 BackupGeometry(); 129 BackupGeometry();
130 130
131#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
132 connect(this->windowHandle(), SIGNAL(screenChanged(QScreen*)), this, SLOT(OnFramebufferSizeChanged()));
133#endif
134} 131}
135 132
136void GRenderWindow::moveContext() 133void GRenderWindow::moveContext()
@@ -278,3 +275,12 @@ void GRenderWindow::OnEmulationStarting(EmuThread* emu_thread) {
278void GRenderWindow::OnEmulationStopping() { 275void GRenderWindow::OnEmulationStopping() {
279 emu_thread = nullptr; 276 emu_thread = nullptr;
280} 277}
278
279void GRenderWindow::showEvent(QShowEvent * event) {
280 QWidget::showEvent(event);
281
282 // windowHandle() is not initialized until the Window is shown, so we connect it here.
283 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
284 connect(this->windowHandle(), SIGNAL(screenChanged(QScreen*)), this, SLOT(OnFramebufferSizeChanged()), Qt::UniqueConnection);
285 #endif
286}
diff --git a/src/citra_qt/bootmanager.h b/src/citra_qt/bootmanager.h
index dc422358e..2fd611367 100644
--- a/src/citra_qt/bootmanager.h
+++ b/src/citra_qt/bootmanager.h
@@ -123,13 +123,12 @@ public:
123 123
124 void OnClientAreaResized(unsigned width, unsigned height); 124 void OnClientAreaResized(unsigned width, unsigned height);
125 125
126 void OnFramebufferSizeChanged();
127
128public slots: 126public slots:
129 void moveContext(); // overridden 127 void moveContext(); // overridden
130 128
131 void OnEmulationStarting(EmuThread* emu_thread); 129 void OnEmulationStarting(EmuThread* emu_thread);
132 void OnEmulationStopping(); 130 void OnEmulationStopping();
131 void OnFramebufferSizeChanged();
133 132
134signals: 133signals:
135 /// Emitted when the window is closed 134 /// Emitted when the window is closed
@@ -146,4 +145,7 @@ private:
146 int keyboard_id; 145 int keyboard_id;
147 146
148 EmuThread* emu_thread; 147 EmuThread* emu_thread;
148
149protected:
150 void showEvent(QShowEvent* event) override;
149}; 151};