mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-05-21 07:02:08 +00:00
Follow the same pattern for releasing the window data in the UIKit driver
Possible fix for https://github.com/libsdl-org/SDL/issues/7361 (cherry picked from commit ebdb32065163b8ee1ef9c1a0dfa601335b4ad83d)
This commit is contained in:
parent
e58a8639e3
commit
6ff3e49b6f
|
@ -347,7 +347,7 @@ UIKit_DestroyWindow(_THIS, SDL_Window * window)
|
||||||
{
|
{
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
if (window->driverdata != NULL) {
|
if (window->driverdata != NULL) {
|
||||||
SDL_WindowData *data = (SDL_WindowData *) CFBridgingRelease(window->driverdata);
|
SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata;
|
||||||
NSArray *views = nil;
|
NSArray *views = nil;
|
||||||
|
|
||||||
[data.viewcontroller stopAnimation];
|
[data.viewcontroller stopAnimation];
|
||||||
|
@ -366,9 +366,11 @@ UIKit_DestroyWindow(_THIS, SDL_Window * window)
|
||||||
* SDL window. */
|
* SDL window. */
|
||||||
data.uiwindow.rootViewController = nil;
|
data.uiwindow.rootViewController = nil;
|
||||||
data.uiwindow.hidden = YES;
|
data.uiwindow.hidden = YES;
|
||||||
|
|
||||||
|
CFRelease(window->driverdata);
|
||||||
|
window->driverdata = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window->driverdata = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue