Fix D3D9 for real

This commit is contained in:
Cacodemon345
2022-07-30 01:53:32 +06:00
committed by GitHub
parent f5bc5f4739
commit 4e3e4355c7

View File

@@ -1433,7 +1433,7 @@ void MainWindow::processMacKeyboardInput(bool down, const QKeyEvent* event) {
void MainWindow::on_actionFullscreen_triggered() { void MainWindow::on_actionFullscreen_triggered() {
if (video_fullscreen > 0) { if (video_fullscreen > 0) {
showNormal(); 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(); ui->menubar->show();
if (!hide_status_bar) ui->statusbar->show(); if (!hide_status_bar) ui->statusbar->show();
if (!hide_tool_bar) ui->toolBar->show(); if (!hide_tool_bar) ui->toolBar->show();
@@ -1467,7 +1467,7 @@ void MainWindow::on_actionFullscreen_triggered() {
ui->statusbar->hide(); ui->statusbar->hide();
ui->toolBar->hide(); ui->toolBar->hide();
showFullScreen(); 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()); ui->stackedWidget->onResize(width(), height());
} }