qt: Fix double dialog and crash when OpenGL is selected on unsupported platform. (#6867)

This commit is contained in:
Steveice10 2023-08-07 18:21:42 -07:00 committed by GitHub
parent f76165d848
commit b739bd2632
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1071,8 +1071,10 @@ bool GMainWindow::LoadROM(const QString& filename) {
ShutdownGame(); ShutdownGame();
} }
render_window->InitRenderTarget(); if (!render_window->InitRenderTarget() || !secondary_window->InitRenderTarget()) {
secondary_window->InitRenderTarget(); LOG_CRITICAL(Frontend, "Failed to initialize render targets!");
return false;
}
const auto scope = render_window->Acquire(); const auto scope = render_window->Acquire();