diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2018-06-08 19:59:24 +0200 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2018-06-08 19:59:41 +0200 |
| commit | 6c19b5947be6ca32c15d5ddb58a68644cc034a4b (patch) | |
| tree | 43b83c2055e34b16bcc8e921958dff994f111853 /Source/Core | |
| parent | 48b7cfa75c84390711502bb5900174113d3d7862 (diff) | |
Qt: Fix exclusive fullscreen not being entered on startup
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt2/MainWindow.cpp | 17 | ||||
| -rw-r--r-- | Source/Core/DolphinQt2/MainWindow.h | 1 |
2 files changed, 11 insertions, 7 deletions
diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index befa0f6ca4..0a49b5f9be 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -209,6 +209,12 @@ void MainWindow::InitCoreCallbacks() connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [=](Core::State state) { if (state == Core::State::Uninitialized) OnStopComplete(); + + if (state == Core::State::Running && m_fullscreen_requested) + { + FullScreen(); + m_fullscreen_requested = false; + } }); installEventFilter(this); m_render_widget->installEventFilter(this); @@ -771,8 +777,12 @@ void MainWindow::StartGame(std::unique_ptr<BootParameters>&& parameters) QMessageBox::critical(this, tr("Error"), tr("Failed to init core"), QMessageBox::Ok); return; } + ShowRenderWidget(); + if (SConfig::GetInstance().bFullscreen) + m_fullscreen_requested = true; + #ifdef Q_OS_WIN // Prevents Windows from sleeping, turning off the display, or idling EXECUTION_STATE shouldScreenSave = @@ -810,13 +820,6 @@ void MainWindow::SetFullScreenResolution(bool fullscreen) void MainWindow::ShowRenderWidget() { - if (SConfig::GetInstance().bFullscreen && !m_render_widget->isFullScreen()) - { - m_render_widget->showFullScreen(); - SetFullScreenResolution(true); - return; - } - SetFullScreenResolution(false); Host::GetInstance()->SetRenderFullscreen(false); diff --git a/Source/Core/DolphinQt2/MainWindow.h b/Source/Core/DolphinQt2/MainWindow.h index 7bf2f3fd80..3f922672ed 100644 --- a/Source/Core/DolphinQt2/MainWindow.h +++ b/Source/Core/DolphinQt2/MainWindow.h @@ -175,6 +175,7 @@ private: bool m_rendering_to_main; bool m_stop_requested = false; bool m_exit_requested = false; + bool m_fullscreen_requested = false; int m_state_slot = 1; std::unique_ptr<BootParameters> m_pending_boot; |
