From 9e0b945c707ffa8122f4b99263d65f992a0bb24a Mon Sep 17 00:00:00 2001 From: ts-korhonen Date: Wed, 12 Jan 2022 20:12:47 +0200 Subject: [PATCH] qt: Fix full screen strecth modes, implement -F switch Patches from Cacodemon345 --- src/qt/qt_mainwindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 96504cf23..2de91a279 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -292,6 +292,15 @@ MainWindow::MainWindow(QWidget *parent) : ui->actionTake_screenshot->setShortcutVisibleInContextMenu(true); #endif video_setblit(qt_blit); + + if (start_in_fullscreen) { + connect(ui->stackedWidget, &RendererStack::blitToRenderer, this, [this] () { + if (start_in_fullscreen) { + QTimer::singleShot(100, ui->actionFullscreen, &QAction::trigger); + start_in_fullscreen = 0; + } + }); + } } void MainWindow::closeEvent(QCloseEvent *event) { @@ -967,6 +976,7 @@ void MainWindow::on_actionFullscreen_triggered() { showFullScreen(); video_fullscreen = 1; } + ui->stackedWidget->rendererWindow->onResize(width(), height()); } void MainWindow::getTitle_(wchar_t *title)