diff --git a/changes.txt b/changes.txt index 272ed0ab..120857f3 100644 --- a/changes.txt +++ b/changes.txt @@ -398,6 +398,9 @@ Changes in 1.9 (not yet released) -------------------------- Changes in 1.8.6 +- Fix OSX 10.9X build problem related to NSApplication setDelegate calls getting casted to wrong class (Bug #462 and also fixing older Bug #297) + Thanks @Ryan Schmidt for bug report and patch. +- Backport: Fix compiling for Apple silicon (Bugs #452 and #461). Thanks @Ryan Schmidt for bug report and updated patch. - Fix compiling on OSX with case-sensitive filesystems: IrrFramework-Info.plist now always starting with upper-case. Thanks @Ryan Schmidt for bug report and patch. - Fix: The build-in libpng now uses same zlib headers as rest of Irrlicht. diff --git a/source/Irrlicht/CIrrDeviceOSX.h b/source/Irrlicht/CIrrDeviceOSX.h index 7034febf..61838f28 100644 --- a/source/Irrlicht/CIrrDeviceOSX.h +++ b/source/Irrlicht/CIrrDeviceOSX.h @@ -26,7 +26,7 @@ namespace irr class CIrrDeviceMacOSX; } -@interface CIrrDelegateOSX : NSObject +@interface CIrrDelegateOSX : NSObject - (id)initWithDevice:(irr::CIrrDeviceMacOSX*)device; - (void)terminate:(id)sender; diff --git a/source/Irrlicht/CIrrDeviceOSX.mm b/source/Irrlicht/CIrrDeviceOSX.mm index 3d6d97e1..fd9412c9 100644 --- a/source/Irrlicht/CIrrDeviceOSX.mm +++ b/source/Irrlicht/CIrrDeviceOSX.mm @@ -579,7 +579,7 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param) { [[NSAutoreleasePool alloc] init]; [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; - [NSApp setDelegate:(id)[[[CIrrDelegateOSX alloc] initWithDevice:this] autorelease]]; + [[NSApplication sharedApplication] setDelegate:[[[CIrrDelegateOSX alloc] initWithDevice:this] autorelease]]; // Create menu @@ -794,7 +794,7 @@ bool CIrrDeviceMacOSX::createWindow() { if (Window) { - [Window setDelegate:(id)[NSApp delegate]]; + [Window setDelegate:(CIrrDelegateOSX *)[NSApp delegate]]; [Window setAcceptsMouseMovedEvents:TRUE]; [Window setIsVisible:TRUE]; [Window makeKeyAndOrderFront:nil];