mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 11:57:24 +08:00
video: hide window before destroying properties
This fixes a few "DEBUG: Parameter 'props' is invalid" messages, when exiting testcamera.
This commit is contained in:
committed by
Anonymous Maarten
parent
690875d555
commit
a7d4ee05f6
@@ -3757,6 +3757,12 @@ void SDL_DestroyWindow(SDL_Window *window)
|
|||||||
SDL_DestroyRendererWithoutFreeing(renderer);
|
SDL_DestroyRendererWithoutFreeing(renderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Restore video mode, etc. */
|
||||||
|
SDL_UpdateFullscreenMode(window, SDL_FALSE, SDL_TRUE);
|
||||||
|
if (!(window->flags & SDL_WINDOW_EXTERNAL)) {
|
||||||
|
SDL_HideWindow(window);
|
||||||
|
}
|
||||||
|
|
||||||
SDL_DestroyProperties(window->props);
|
SDL_DestroyProperties(window->props);
|
||||||
|
|
||||||
/* Clear the modal status, but don't unset the parent, as it may be
|
/* Clear the modal status, but don't unset the parent, as it may be
|
||||||
@@ -3767,12 +3773,6 @@ void SDL_DestroyWindow(SDL_Window *window)
|
|||||||
_this->SetWindowModalFor(_this, window, NULL);
|
_this->SetWindowModalFor(_this, window, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Restore video mode, etc. */
|
|
||||||
SDL_UpdateFullscreenMode(window, SDL_FALSE, SDL_TRUE);
|
|
||||||
if (!(window->flags & SDL_WINDOW_EXTERNAL)) {
|
|
||||||
SDL_HideWindow(window);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Make sure the destroyed window isn't referenced by any display as a fullscreen window. */
|
/* Make sure the destroyed window isn't referenced by any display as a fullscreen window. */
|
||||||
for (int i = 0; i < _this->num_displays; ++i) {
|
for (int i = 0; i < _this->num_displays; ++i) {
|
||||||
if (_this->displays[i]->fullscreen_window == window) {
|
if (_this->displays[i]->fullscreen_window == window) {
|
||||||
|
|||||||
Reference in New Issue
Block a user