mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-17 22:25:37 +00:00
Qt: Add a way for the emulation thread to request fullscreen state
This commit is contained in:
parent
460ff24248
commit
8ffdcf1b7e
|
@ -81,7 +81,11 @@ void MainWindow::destroyDisplayWindow()
|
||||||
|
|
||||||
void MainWindow::toggleFullscreen()
|
void MainWindow::toggleFullscreen()
|
||||||
{
|
{
|
||||||
const bool fullscreen = !m_display_widget->isFullScreen();
|
setFullscreen(!m_display_widget->isFullScreen());
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::setFullscreen(bool fullscreen)
|
||||||
|
{
|
||||||
if (fullscreen)
|
if (fullscreen)
|
||||||
{
|
{
|
||||||
m_ui.mainContainer->setCurrentIndex(0);
|
m_ui.mainContainer->setCurrentIndex(0);
|
||||||
|
@ -335,6 +339,7 @@ void MainWindow::connectSignals()
|
||||||
connect(m_host_interface, &QtHostInterface::createDisplayWindowRequested, this, &MainWindow::createDisplayWindow,
|
connect(m_host_interface, &QtHostInterface::createDisplayWindowRequested, this, &MainWindow::createDisplayWindow,
|
||||||
Qt::BlockingQueuedConnection);
|
Qt::BlockingQueuedConnection);
|
||||||
connect(m_host_interface, &QtHostInterface::destroyDisplayWindowRequested, this, &MainWindow::destroyDisplayWindow);
|
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::toggleFullscreenRequested, this, &MainWindow::toggleFullscreen);
|
||||||
connect(m_host_interface, &QtHostInterface::messageReported, this, &MainWindow::reportMessage);
|
connect(m_host_interface, &QtHostInterface::messageReported, this, &MainWindow::reportMessage);
|
||||||
connect(m_host_interface, &QtHostInterface::emulationStarted, this, &MainWindow::onEmulationStarted);
|
connect(m_host_interface, &QtHostInterface::emulationStarted, this, &MainWindow::onEmulationStarted);
|
||||||
|
|
|
@ -26,6 +26,7 @@ private Q_SLOTS:
|
||||||
void reportMessage(const QString& message);
|
void reportMessage(const QString& message);
|
||||||
void createDisplayWindow(QThread* worker_thread, bool use_debug_device);
|
void createDisplayWindow(QThread* worker_thread, bool use_debug_device);
|
||||||
void destroyDisplayWindow();
|
void destroyDisplayWindow();
|
||||||
|
void setFullscreen(bool fullscreen);
|
||||||
void toggleFullscreen();
|
void toggleFullscreen();
|
||||||
void onEmulationStarted();
|
void onEmulationStarted();
|
||||||
void onEmulationStopped();
|
void onEmulationStopped();
|
||||||
|
|
|
@ -71,6 +71,7 @@ Q_SIGNALS:
|
||||||
void gameListRefreshed();
|
void gameListRefreshed();
|
||||||
void createDisplayWindowRequested(QThread* worker_thread, bool use_debug_device);
|
void createDisplayWindowRequested(QThread* worker_thread, bool use_debug_device);
|
||||||
void destroyDisplayWindowRequested();
|
void destroyDisplayWindowRequested();
|
||||||
|
void setFullscreenRequested(bool fullscreen);
|
||||||
void toggleFullscreenRequested();
|
void toggleFullscreenRequested();
|
||||||
void systemPerformanceCountersUpdated(float speed, float fps, float vps, float avg_frame_time,
|
void systemPerformanceCountersUpdated(float speed, float fps, float vps, float avg_frame_time,
|
||||||
float worst_frame_time);
|
float worst_frame_time);
|
||||||
|
|
Loading…
Reference in a new issue