From 2ad0c27f7190e5a03a07c465f0e3ead2ec53ebad Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sat, 30 Jul 2022 00:38:51 +0600 Subject: [PATCH 1/3] qt: Fix fullscreen at start with Direct3D 9 renderer --- src/qt/qt_mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 0725d21a4..8c1563242 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -470,7 +470,7 @@ MainWindow::MainWindow(QWidget *parent) : video_setblit(qt_blit); if (start_in_fullscreen) { - connect(ui->stackedWidget, &RendererStack::blitToRenderer, this, [this] () { + connect(ui->stackedWidget, &RendererStack::blit, this, [this] () { if (start_in_fullscreen) { QTimer::singleShot(100, ui->actionFullscreen, &QAction::trigger); start_in_fullscreen = 0; From f5bc5f47397eca769c35c7c874654b71c36416e3 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sat, 30 Jul 2022 01:45:08 +0600 Subject: [PATCH 2/3] qt: Fix fullscreen crashes on NVIDIA GPUs --- src/qt/qt_mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 8c1563242..dc02f5030 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -1467,6 +1467,7 @@ void MainWindow::on_actionFullscreen_triggered() { ui->statusbar->hide(); ui->toolBar->hide(); showFullScreen(); + if (vid_api == 5) ui->stackedWidget->switchRenderer(RendererStack::Renderer::Direct3D9); } ui->stackedWidget->onResize(width(), height()); } From 4e3e4355c76b29a42c6ab8a116f2f04a1c4283f7 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sat, 30 Jul 2022 01:53:32 +0600 Subject: [PATCH 3/3] Fix D3D9 for real --- src/qt/qt_mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index dc02f5030..350057a1a 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -1433,7 +1433,7 @@ void MainWindow::processMacKeyboardInput(bool down, const QKeyEvent* event) { void MainWindow::on_actionFullscreen_triggered() { if (video_fullscreen > 0) { showNormal(); - if (vid_api == 5) ui->stackedWidget->switchRenderer(RendererStack::Renderer::Direct3D9); + if (vid_api == 5) QTimer::singleShot(0, this, [this] () { ui->stackedWidget->switchRenderer(RendererStack::Renderer::Direct3D9); }); ui->menubar->show(); if (!hide_status_bar) ui->statusbar->show(); if (!hide_tool_bar) ui->toolBar->show(); @@ -1467,7 +1467,7 @@ void MainWindow::on_actionFullscreen_triggered() { ui->statusbar->hide(); ui->toolBar->hide(); showFullScreen(); - if (vid_api == 5) ui->stackedWidget->switchRenderer(RendererStack::Renderer::Direct3D9); + if (vid_api == 5) QTimer::singleShot(0, this, [this] () { ui->stackedWidget->switchRenderer(RendererStack::Renderer::Direct3D9); }); } ui->stackedWidget->onResize(width(), height()); }