src/video/uikit/SDL_uikitwindow.m
changeset 6044 35448a5ea044
parent 6014 7a8b72b88d86
child 6064 498e0234dfe6
equal deleted inserted replaced
6043:46d78e48ae8b 6044:35448a5ea044
    18      misrepresented as being the original software.
    18      misrepresented as being the original software.
    19   3. This notice may not be removed or altered from any source distribution.
    19   3. This notice may not be removed or altered from any source distribution.
    20 */
    20 */
    21 #include "SDL_config.h"
    21 #include "SDL_config.h"
    22 
    22 
       
    23 #if SDL_VIDEO_DRIVER_UIKIT
       
    24 
    23 #include "SDL_syswm.h"
    25 #include "SDL_syswm.h"
    24 #include "SDL_video.h"
    26 #include "SDL_video.h"
    25 #include "SDL_mouse.h"
    27 #include "SDL_mouse.h"
    26 #include "SDL_assert.h"
    28 #include "SDL_assert.h"
    27 #include "SDL_hints.h"
    29 #include "SDL_hints.h"
    86             [UIApplication sharedApplication].statusBarHidden = YES;
    88             [UIApplication sharedApplication].statusBarHidden = YES;
    87         } else {
    89         } else {
    88             [UIApplication sharedApplication].statusBarHidden = NO;
    90             [UIApplication sharedApplication].statusBarHidden = NO;
    89         }
    91         }
    90 
    92 
    91         const UIDeviceOrientation o = [[UIDevice currentDevice] orientation];
    93         //const UIDeviceOrientation o = [[UIDevice currentDevice] orientation];
    92         const BOOL landscape = (o == UIDeviceOrientationLandscapeLeft) ||
    94         //const BOOL landscape = (o == UIDeviceOrientationLandscapeLeft) ||
    93                                    (o == UIDeviceOrientationLandscapeRight);
    95         //                           (o == UIDeviceOrientationLandscapeRight);
    94         const BOOL rotate = ( ((window->w > window->h) && (!landscape)) ||
    96         //const BOOL rotate = ( ((window->w > window->h) && (!landscape)) ||
    95                               ((window->w < window->h) && (landscape)) );
    97         //                      ((window->w < window->h) && (landscape)) );
    96 
    98 
    97         // The View Controller will handle rotating the view when the
    99         // The View Controller will handle rotating the view when the
    98         //  device orientation changes. This will trigger resize events, if
   100         //  device orientation changes. This will trigger resize events, if
    99         //  appropriate.
   101         //  appropriate.
   100         SDL_uikitviewcontroller *controller;
   102         SDL_uikitviewcontroller *controller;
   213                      SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
   215                      SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
   214         return SDL_FALSE;
   216         return SDL_FALSE;
   215     }
   217     }
   216 }
   218 }
   217 
   219 
       
   220 #endif /* SDL_VIDEO_DRIVER_UIKIT */
       
   221 
   218 /* vi: set ts=4 sw=4 expandtab: */
   222 /* vi: set ts=4 sw=4 expandtab: */