summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorN00byKing <N00byKing@users.noreply.github.com>2018-01-17 23:19:41 +0100
committerbunnei <bunneidev@gmail.com>2018-01-17 23:19:41 +0100
commitb17763e3d4e37caa994fd2ca531a4f48abb5ebac (patch)
tree9c84378459fd4b6f2e62bf7709d8f9a409355564 /src
parentMerge pull request #77 from gdkchan/no_relocs (diff)
downloadyuzu-b17763e3d4e37caa994fd2ca531a4f48abb5ebac.tar
yuzu-b17763e3d4e37caa994fd2ca531a4f48abb5ebac.tar.gz
yuzu-b17763e3d4e37caa994fd2ca531a4f48abb5ebac.tar.bz2
yuzu-b17763e3d4e37caa994fd2ca531a4f48abb5ebac.tar.lz
yuzu-b17763e3d4e37caa994fd2ca531a4f48abb5ebac.tar.xz
yuzu-b17763e3d4e37caa994fd2ca531a4f48abb5ebac.tar.zst
yuzu-b17763e3d4e37caa994fd2ca531a4f48abb5ebac.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/bootmanager.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 843ac6ad7..61d678c9b 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -1,12 +1,8 @@
#include <QApplication>
#include <QHBoxLayout>
#include <QKeyEvent>
-
-#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
-// Required for screen DPI information
#include <QScreen>
#include <QWindow>
-#endif
#include "common/microprofile.h"
#include "common/scm_rev.h"
@@ -120,15 +116,13 @@ GRenderWindow::~GRenderWindow() {
void GRenderWindow::moveContext() {
DoneCurrent();
-// We need to move GL context to the swapping thread in Qt5
-#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+
// If the thread started running, move the GL Context to the new thread. Otherwise, move it
// back.
auto thread = (QThread::currentThread() == qApp->thread() && emu_thread != nullptr)
? emu_thread
: qApp->thread();
child->context()->moveToThread(thread);
-#endif
}
void GRenderWindow::SwapBuffers() {
@@ -191,12 +185,8 @@ QByteArray GRenderWindow::saveGeometry() {
}
qreal GRenderWindow::windowPixelRatio() {
-#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
// windowHandle() might not be accessible until the window is displayed to screen.
return windowHandle() ? windowHandle()->screen()->devicePixelRatio() : 1.0f;
-#else
- return 1.0f;
-#endif
}
void GRenderWindow::closeEvent(QCloseEvent* event) {
@@ -299,9 +289,7 @@ void GRenderWindow::OnEmulationStopping() {
void GRenderWindow::showEvent(QShowEvent* event) {
QWidget::showEvent(event);
-#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
// windowHandle() is not initialized until the Window is shown, so we connect it here.
connect(this->windowHandle(), SIGNAL(screenChanged(QScreen*)), this,
SLOT(OnFramebufferSizeChanged()), Qt::UniqueConnection);
-#endif
}