mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-16 21:51:17 +00:00
Avoid retrying renderer init if we know the error was not transient
This commit is contained in:
@@ -186,7 +186,6 @@ bool SdlRenderer::initialize(PDECODER_PARAMETERS params)
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"SDL_CreateRenderer() failed: %s",
|
||||
SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
|
||||
// SDL_CreateRenderer() can end up having to recreate our window (SDL_RecreateWindow())
|
||||
@@ -206,6 +205,11 @@ bool SdlRenderer::initialize(PDECODER_PARAMETERS params)
|
||||
SDL_FlushEvent(SDL_WINDOWEVENT);
|
||||
}
|
||||
|
||||
if (!m_Renderer) {
|
||||
m_InitFailureReason = InitFailureReason::NoSoftwareSupport;
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
// For some reason, using Direct3D9Ex breaks this with multi-monitor setups.
|
||||
// When focus is lost, the window is minimized then immediately restored without
|
||||
|
||||
Reference in New Issue
Block a user