Clean up renderers at shutdown

Fixes https://github.com/libsdl-org/SDL/issues/10082
This commit is contained in:
Sam Lantinga
2024-06-23 00:41:19 -07:00
parent fd3143f445
commit ab3c8552c2
3 changed files with 34 additions and 0 deletions

View File

@@ -47,6 +47,7 @@
#include "haptic/SDL_haptic_c.h"
#include "joystick/SDL_gamepad_c.h"
#include "joystick/SDL_joystick_c.h"
#include "render/SDL_sysrender.h"
#include "sensor/SDL_sensor_c.h"
#include "stdlib/SDL_getenv_c.h"
#include "video/SDL_video_c.h"
@@ -474,6 +475,7 @@ void SDL_QuitSubSystem(Uint32 flags)
#ifndef SDL_VIDEO_DISABLED
if (flags & SDL_INIT_VIDEO) {
if (SDL_ShouldQuitSubsystem(SDL_INIT_VIDEO)) {
SDL_QuitRender();
SDL_VideoQuit();
/* video implies events */
SDL_QuitSubSystem(SDL_INIT_EVENTS);