Ensure the decoder always resets if we've manually destroyed it

Fixes #2103
This commit is contained in:
Cameron Gutman committed 2026-11-29 22:20:58 -06:00
1 parent 2599d23ee0
commit fd0fc5a808
1 file changed
+6
+6
View File
@@ -1542,6 +1542,12 @@ void Session::toggleFullscreen()
delete m_VideoDecoder; delete m_VideoDecoder;
m_VideoDecoder = nullptr; m_VideoDecoder = nullptr;
SDL_UnlockMutex(m_DecoderLock); SDL_UnlockMutex(m_DecoderLock);
// Fake that the renderer died to ensure it's re-created even if the window
// size doesn't change when entering or leaving full-screen mode.
SDL_Event event;
event.type = SDL_RENDER_DEVICE_RESET;
SDL_PushEvent(&event);
#endif #endif
// Actually enter/leave fullscreen // Actually enter/leave fullscreen