Uses SDL workaround only for GL

This commit is contained in:
Vladislav Belov 2025-10-15 00:52:21 +02:00
parent f2752f7230
commit 1441c971f5
No known key found for this signature in database
GPG key ID: 353545E45DB9CCB3

View file

@ -595,7 +595,8 @@ bool CVideoMode::InitSDL()
// Calling SDL_Quit twice appears to be harmless, though, and avoids the problem
// by destroying the context *before* the driver's atexit hook is called.
// (Note that atexit hooks are guaranteed to be called in reverse order of their registration.)
atexit(SDL_Quit);
if (m_Backend == Renderer::Backend::Backend::GL || m_Backend == Renderer::Backend::Backend::GL_ARB)
atexit(SDL_Quit);
// End work around.
m_IsInitialised = true;