mac: Fix SDLWindow nswindow member no longer being cleaned up in Cocoa_DestroyWindow
- A refactor changed how SetupWindowData handled external windows where previously it was tracked in a field of SDL_CocoaWindowData but now it is tracked by setting SDL_WINDOW_EXTERNAL in the window flags. Removed the now unused field and updated the external window check in DestroyWindow.
This commit is contained in:
parent
cfabb7a9ac
commit
42f8e94d11
@ -132,7 +132,6 @@ typedef enum
|
||||
@property(nonatomic) NSWindow *nswindow;
|
||||
@property(nonatomic) NSView *sdlContentView;
|
||||
@property(nonatomic) NSMutableArray *nscontexts;
|
||||
@property(nonatomic) SDL_bool created;
|
||||
@property(nonatomic) BOOL in_blocking_transition;
|
||||
@property(nonatomic) BOOL was_zoomed;
|
||||
@property(nonatomic) NSInteger window_number;
|
||||
|
@ -2830,7 +2830,8 @@ void Cocoa_DestroyWindow(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
}
|
||||
[data.listener close];
|
||||
data.listener = nil;
|
||||
if (data.created) {
|
||||
|
||||
if (!(window->flags & SDL_WINDOW_EXTERNAL)) {
|
||||
/* Release the content view to avoid further updateLayer callbacks */
|
||||
[data.nswindow setContentView:nil];
|
||||
[data.nswindow close];
|
||||
|
Loading…
x
Reference in New Issue
Block a user