mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-29 20:27:12 +01:00
Disabled the custom iOS splashscreen code - it interferes with the normal rotation and orientation behaviour of SDL windows.
This commit is contained in:
parent
d2e445d7bb
commit
e234575d54
@ -205,12 +205,18 @@ SDL_IdleTimerDisabledChanged(void *userdata, const char *name, const char *oldVa
|
|||||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||||
{
|
{
|
||||||
/* Keep the launch image up until we set a video mode */
|
/* Keep the launch image up until we set a video mode */
|
||||||
launch_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
|
||||||
|
/* This is disabled temporarily because the splash viewcontroller is
|
||||||
|
* interfering with rotation once a regular window is created: the view's
|
||||||
|
* orientations are incorrect and the status bar rotates without the view.
|
||||||
|
* Additionally, the splash viewcontroller doesn't load the correct launch
|
||||||
|
* images on iOS 7 and modern devices. */
|
||||||
|
/*launch_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||||
|
|
||||||
UIViewController *splashViewController = [[SDL_splashviewcontroller alloc] init];
|
UIViewController *splashViewController = [[SDL_splashviewcontroller alloc] init];
|
||||||
launch_window.rootViewController = splashViewController;
|
launch_window.rootViewController = splashViewController;
|
||||||
[launch_window addSubview:splashViewController.view];
|
[launch_window addSubview:splashViewController.view];
|
||||||
[launch_window makeKeyAndVisible];
|
[launch_window makeKeyAndVisible];*/
|
||||||
|
|
||||||
/* Set working directory to resource path */
|
/* Set working directory to resource path */
|
||||||
[[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]];
|
[[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]];
|
||||||
|
@ -127,6 +127,7 @@
|
|||||||
- (UIStatusBarStyle)preferredStatusBarStyle
|
- (UIStatusBarStyle)preferredStatusBarStyle
|
||||||
{
|
{
|
||||||
#ifdef __IPHONE_7_0
|
#ifdef __IPHONE_7_0
|
||||||
|
/* We assume most games don't have a bright white background. */
|
||||||
return UIStatusBarStyleLightContent;
|
return UIStatusBarStyleLightContent;
|
||||||
#else
|
#else
|
||||||
/* This method is only used in iOS 7+, so the return value here isn't important. */
|
/* This method is only used in iOS 7+, so the return value here isn't important. */
|
||||||
|
@ -42,8 +42,6 @@
|
|||||||
#include <Foundation/Foundation.h>
|
#include <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bool created)
|
static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bool created)
|
||||||
{
|
{
|
||||||
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
|
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
|
||||||
@ -115,9 +113,7 @@ static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bo
|
|||||||
* device orientation changes. This will trigger resize events, if
|
* device orientation changes. This will trigger resize events, if
|
||||||
* appropriate.
|
* appropriate.
|
||||||
*/
|
*/
|
||||||
SDL_uikitviewcontroller *controller;
|
data->viewcontroller = [[SDL_uikitviewcontroller alloc] initWithSDLWindow:window];
|
||||||
controller = [SDL_uikitviewcontroller alloc];
|
|
||||||
data->viewcontroller = [controller initWithSDLWindow:window];
|
|
||||||
[data->viewcontroller setTitle:@"SDL App"]; /* !!! FIXME: hook up SDL_SetWindowTitle() */
|
[data->viewcontroller setTitle:@"SDL App"]; /* !!! FIXME: hook up SDL_SetWindowTitle() */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -245,7 +241,7 @@ UIKit_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
|
|||||||
SDL_uikitviewcontroller *viewcontroller = windowdata->viewcontroller;
|
SDL_uikitviewcontroller *viewcontroller = windowdata->viewcontroller;
|
||||||
UIWindow *uiwindow = windowdata->uiwindow;
|
UIWindow *uiwindow = windowdata->uiwindow;
|
||||||
|
|
||||||
if (fullscreen) {
|
if (fullscreen || (window->flags & SDL_WINDOW_BORDERLESS)) {
|
||||||
[UIApplication sharedApplication].statusBarHidden = YES;
|
[UIApplication sharedApplication].statusBarHidden = YES;
|
||||||
} else {
|
} else {
|
||||||
[UIApplication sharedApplication].statusBarHidden = NO;
|
[UIApplication sharedApplication].statusBarHidden = NO;
|
||||||
|
Loading…
Reference in New Issue
Block a user