mirror of https://github.com/libsdl-org/SDL.git
Use an autoreleasepool in Cocoa_GetDisplayUsableBounds()
Fixes https://github.com/libsdl-org/SDL/issues/12571
This commit is contained in:
parent
82335fd0e9
commit
8b924df48b
|
|
@ -556,6 +556,7 @@ bool Cocoa_GetDisplayBounds(SDL_VideoDevice *_this, SDL_VideoDisplay *display, S
|
||||||
|
|
||||||
bool Cocoa_GetDisplayUsableBounds(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_Rect *rect)
|
bool Cocoa_GetDisplayUsableBounds(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_Rect *rect)
|
||||||
{
|
{
|
||||||
|
@autoreleasepool {
|
||||||
SDL_DisplayData *displaydata = (SDL_DisplayData *)display->internal;
|
SDL_DisplayData *displaydata = (SDL_DisplayData *)display->internal;
|
||||||
NSScreen *screen = GetNSScreenForDisplayID(displaydata->display);
|
NSScreen *screen = GetNSScreenForDisplayID(displaydata->display);
|
||||||
|
|
||||||
|
|
@ -573,6 +574,7 @@ bool Cocoa_GetDisplayUsableBounds(SDL_VideoDevice *_this, SDL_VideoDisplay *disp
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool Cocoa_GetDisplayModes(SDL_VideoDevice *_this, SDL_VideoDisplay *display)
|
bool Cocoa_GetDisplayModes(SDL_VideoDevice *_this, SDL_VideoDisplay *display)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue