diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index 91d84568f9..d8b5db284c 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -144,8 +144,7 @@ QByteArray GRenderWindow::saveGeometry() { } qreal GRenderWindow::windowPixelRatio() const { - // QOpenGLWidget isn't backed by a native window, so we need to use the top level window instead - return QApplication::activeWindow()->devicePixelRatio(); + return devicePixelRatio(); } std::pair GRenderWindow::ScaleTouch(const QPointF pos) const { @@ -250,7 +249,6 @@ void GRenderWindow::focusOutEvent(QFocusEvent* event) { void GRenderWindow::resizeEvent(QResizeEvent* event) { QOpenGLWidget::resizeEvent(event); - NotifyClientAreaSizeChanged(std::make_pair(event->size().width(), event->size().height())); OnFramebufferSizeChanged(); } @@ -298,10 +296,6 @@ void GRenderWindow::paintGL() { void GRenderWindow::showEvent(QShowEvent* event) { QWidget::showEvent(event); - - // windowHandle() is not initialized until the Window is shown, so we connect it here. - connect(windowHandle(), &QWindow::screenChanged, this, &GRenderWindow::OnFramebufferSizeChanged, - Qt::UniqueConnection); } std::unique_ptr GRenderWindow::CreateSharedContext() const { diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h index be868f5064..7d61da46dc 100644 --- a/src/core/frontend/emu_window.h +++ b/src/core/frontend/emu_window.h @@ -185,15 +185,6 @@ protected: framebuffer_layout = layout; } - /** - * Update internal client area size with the given parameter. - * @note EmuWindow implementations will usually use this in window resize event handlers. - */ - void NotifyClientAreaSizeChanged(const std::pair& size) { - client_area_width = size.first; - client_area_height = size.second; - } - private: /** * Handler called when the minimal client area was requested to be changed via SetConfig. @@ -206,9 +197,6 @@ private: Layout::FramebufferLayout framebuffer_layout; ///< Current framebuffer layout - unsigned client_area_width; ///< Current client width, should be set by window impl. - unsigned client_area_height; ///< Current client height, should be set by window impl. - WindowConfig config; ///< Internal configuration (changes pending for being applied in /// ProcessConfigurationChanges) WindowConfig active_config; ///< Internal active configuration