mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 15:15:39 +00:00
Fix SigSegV from displayInfoInvalidate when changing resolution
This commit is contained in:
parent
1c41b53551
commit
a35a7d2507
|
@ -475,12 +475,9 @@ Cocoa_GetDisplayDPI(_THIS, SDL_VideoDisplay * display, float * ddpi, float * hdp
|
|||
CGFloat height = CGDisplayModeGetPixelHeight(m);
|
||||
CGFloat HiDPIWidth = CGDisplayModeGetWidth(m);
|
||||
|
||||
BOOL isNative = (CGDisplayModeGetIOFlags(m) & kDisplayModeNativeFlag) ? true : false;
|
||||
CFRelease(m);
|
||||
|
||||
//Only check 1x mode
|
||||
if(width == HiDPIWidth) {
|
||||
if(isNative) {
|
||||
if (CGDisplayModeGetIOFlags(m) & kDisplayModeNativeFlag) {
|
||||
displayNativeSize.width = width;
|
||||
displayNativeSize.height = height;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue