diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 39c5fe294..971042797 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -81,7 +81,11 @@ void MainWindow::destroyDisplayWindow() void MainWindow::toggleFullscreen() { - const bool fullscreen = !m_display_widget->isFullScreen(); + setFullscreen(!m_display_widget->isFullScreen()); +} + +void MainWindow::setFullscreen(bool fullscreen) +{ if (fullscreen) { m_ui.mainContainer->setCurrentIndex(0); @@ -335,6 +339,7 @@ void MainWindow::connectSignals() connect(m_host_interface, &QtHostInterface::createDisplayWindowRequested, this, &MainWindow::createDisplayWindow, Qt::BlockingQueuedConnection); connect(m_host_interface, &QtHostInterface::destroyDisplayWindowRequested, this, &MainWindow::destroyDisplayWindow); + connect(m_host_interface, &QtHostInterface::setFullscreenRequested, this, &MainWindow::setFullscreen); connect(m_host_interface, &QtHostInterface::toggleFullscreenRequested, this, &MainWindow::toggleFullscreen); connect(m_host_interface, &QtHostInterface::messageReported, this, &MainWindow::reportMessage); connect(m_host_interface, &QtHostInterface::emulationStarted, this, &MainWindow::onEmulationStarted); diff --git a/src/duckstation-qt/mainwindow.h b/src/duckstation-qt/mainwindow.h index f18345c37..47c3594a5 100644 --- a/src/duckstation-qt/mainwindow.h +++ b/src/duckstation-qt/mainwindow.h @@ -26,6 +26,7 @@ private Q_SLOTS: void reportMessage(const QString& message); void createDisplayWindow(QThread* worker_thread, bool use_debug_device); void destroyDisplayWindow(); + void setFullscreen(bool fullscreen); void toggleFullscreen(); void onEmulationStarted(); void onEmulationStopped(); diff --git a/src/duckstation-qt/qthostinterface.h b/src/duckstation-qt/qthostinterface.h index f82598cea..0d765122c 100644 --- a/src/duckstation-qt/qthostinterface.h +++ b/src/duckstation-qt/qthostinterface.h @@ -71,6 +71,7 @@ Q_SIGNALS: void gameListRefreshed(); void createDisplayWindowRequested(QThread* worker_thread, bool use_debug_device); void destroyDisplayWindowRequested(); + void setFullscreenRequested(bool fullscreen); void toggleFullscreenRequested(); void systemPerformanceCountersUpdated(float speed, float fps, float vps, float avg_frame_time, float worst_frame_time);