qt: Fix full screen strecth modes, implement -F switch

Patches from Cacodemon345
This commit is contained in:
ts-korhonen
2022-01-12 20:12:47 +02:00
parent 621ab60907
commit 9e0b945c70

View File

@@ -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)