From 2149bfb31761d08ea7c7303b4911164a2df2b4d4 Mon Sep 17 00:00:00 2001 From: cutealien Date: Fri, 4 Aug 2023 10:22:58 +0000 Subject: [PATCH] Merging r6511 through r6520 from branch releases/1.8 to trunk Note: Due to OSX always failing merge OSX it's rather applying a second patch from Ryan Schmidt from bugreport #462 to trunk (Not sure why svn merging always fails for OSX. Probably related to MacOSX files getting moved in the past. Was that done without svn move commands? I guess that can't be fixed anymore now) git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6521 dfc29bdd-3216-0410-991c-e03cc46cb475 --- changes.txt | 3 +++ source/Irrlicht/CIrrDeviceOSX.h | 2 +- source/Irrlicht/CIrrDeviceOSX.mm | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/changes.txt b/changes.txt index 272ed0a..120857f 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 7034feb..61838f2 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 3d6d97e..fd9412c 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];