Hey, is it possible to apply this small patch below to SDL sources?
In this way +sharedAppDelegate returns a generic object instead of a
SDLUIKitDelegate, so that its subclasses can use this method without
having to cast it every time.
Thanks
Vittorio----------------------------------------------------------------------------------------------------------------
diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitappdelegate.h
— a/src/video/uikit/SDL_uikitappdelegate.h Wed Nov 09 02:35:49 2011 -0500
+++ b/src/video/uikit/SDL_uikitappdelegate.h Sat Nov 19 15:43:20 2011 +0100
@@ -24,7 +24,7 @@
@interface SDLUIKitDelegate : NSObject {
}
-+ (SDLUIKitDelegate *)sharedAppDelegate;
++ (id) sharedAppDelegate;
- (NSString *)getAppDelegateClassName;
@end
diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitappdelegate.m
— a/src/video/uikit/SDL_uikitappdelegate.m Wed Nov 09 02:35:49 2011 -0500
+++ b/src/video/uikit/SDL_uikitappdelegate.m Sat Nov 19 15:43:20 2011 +0100
@@ -79,10 +79,10 @@
@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