Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Make +sharedAppDelegate return a generic object instead of a SDLUIKit…
Browse files Browse the repository at this point in the history
…Delegate.

This way subclasses can use it without a lot of casting.

Thanks to Vittorio Giovara for the patch!
  • Loading branch information
icculus committed Nov 20, 2011
1 parent 4262a04 commit 692d723
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/video/uikit/SDL_uikitappdelegate.h
Expand Up @@ -24,7 +24,7 @@
@interface SDLUIKitDelegate : NSObject<UIApplicationDelegate> {
}

+ (SDLUIKitDelegate *)sharedAppDelegate;
+ (id) sharedAppDelegate;
+ (NSString *)getAppDelegateClassName;

@end
Expand Down
4 changes: 2 additions & 2 deletions src/video/uikit/SDL_uikitappdelegate.m
Expand Up @@ -79,10 +79,10 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue,
@implementation SDLUIKitDelegate

/* convenience method */
+ (SDLUIKitDelegate *)sharedAppDelegate
+ (id) sharedAppDelegate
{
/* the delegate is set in UIApplicationMain(), which is garaunteed to be called before this method */
return (SDLUIKitDelegate *)[[UIApplication sharedApplication] delegate];
return [[UIApplication sharedApplication] delegate];
}

+ (NSString *)getAppDelegateClassName
Expand Down

0 comments on commit 692d723

Please sign in to comment.