video: Minor cleanup in SDL_VideoQuit.

(This code changed in SDL3, no need to cherry-pick it to there.)
This commit is contained in:
Ryan C. Gordon 2023-08-18 11:43:59 -04:00
parent 04ff593bf5
commit 1f4e86d61c
No known key found for this signature in database
GPG key ID: FA148B892AB48044

View file

@ -3355,18 +3355,14 @@ void SDL_VideoQuit(void)
SDL_VideoDisplay *display = &_this->displays[i];
SDL_ResetDisplayModes(i);
SDL_free(display->desktop_mode.driverdata);
display->desktop_mode.driverdata = NULL;
SDL_free(display->driverdata);
display->driverdata = NULL;
}
if (_this->displays) {
for (i = 0; i < _this->num_displays; ++i) {
SDL_free(_this->displays[i].name);
}
SDL_free(_this->displays);
_this->displays = NULL;
_this->num_displays = 0;
SDL_free(display->name);
}
SDL_free(_this->displays);
_this->displays = NULL;
_this->num_displays = 0;
SDL_free(_this->clipboard_text);
_this->clipboard_text = NULL;
_this->free(_this);