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
This commit is contained in:
cutealien
2023-08-04 10:22:58 +00:00
parent 03fc9c73b5
commit 2149bfb317
3 changed files with 6 additions and 3 deletions

View File

@ -26,7 +26,7 @@ namespace irr
class CIrrDeviceMacOSX;
}
@interface CIrrDelegateOSX : NSObject
@interface CIrrDelegateOSX : NSObject <NSApplicationDelegate, NSWindowDelegate>
- (id)initWithDevice:(irr::CIrrDeviceMacOSX*)device;
- (void)terminate:(id)sender;

View File

@ -579,7 +579,7 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
{
[[NSAutoreleasePool alloc] init];
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
[NSApp setDelegate:(id<NSApplicationDelegate>)[[[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<NSWindowDelegate>)[NSApp delegate]];
[Window setDelegate:(CIrrDelegateOSX *)[NSApp delegate]];
[Window setAcceptsMouseMovedEvents:TRUE];
[Window setIsVisible:TRUE];
[Window makeKeyAndOrderFront:nil];