Make SDL_SysWMinfo usable on Mac/iOS with ARC enabled (thanks, Alex!).
authorRyan C. Gordon <icculus@icculus.org>
Wed, 30 Jul 2014 14:14:19 -0400
changeset 9035d6464107048c
parent 9034 335b60fba5c2
child 9037 e9d67ac0c6f8
Make SDL_SysWMinfo usable on Mac/iOS with ARC enabled (thanks, Alex!).

Fixes Bugzilla #2641.
include/SDL_syswm.h
     1.1 --- a/include/SDL_syswm.h	Wed Jul 30 14:12:54 2014 -0400
     1.2 +++ b/include/SDL_syswm.h	Wed Jul 30 14:14:19 2014 -0400
     1.3 @@ -208,13 +208,21 @@
     1.4  #if defined(SDL_VIDEO_DRIVER_COCOA)
     1.5          struct
     1.6          {
     1.7 -            NSWindow *window;           /* The Cocoa window */
     1.8 +#if defined(__OBJC__) && __has_feature(objc_arc)
     1.9 +            NSWindow __unsafe_unretained *window; /* The Cocoa window */
    1.10 +#else
    1.11 +            NSWindow *window;                     /* The Cocoa window */
    1.12 +#endif
    1.13          } cocoa;
    1.14  #endif
    1.15  #if defined(SDL_VIDEO_DRIVER_UIKIT)
    1.16          struct
    1.17          {
    1.18 -            UIWindow *window;           /* The UIKit window */
    1.19 +#if defined(__OBJC__) && __has_feature(objc_arc)
    1.20 +            UIWindow __unsafe_unretained *window; /* The UIKit window */
    1.21 +#else
    1.22 +            UIWindow *window;                     /* The UIKit window */
    1.23 +#endif
    1.24          } uikit;
    1.25  #endif
    1.26  #if defined(SDL_VIDEO_DRIVER_WAYLAND)