Avoid retrying renderer init if we know the error was not transient
This commit is contained in:
parent
351aaa6759
commit
fd70865026
13 changed files with 116 additions and 32 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue