From 402a08f5549465914804960ed233e9fbf75de449 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 20 Sep 2014 23:16:29 -0400 Subject: [PATCH] iOS: Move instance variables in RetroArch_iOS over to properties. --- apple/iOS/platform.h | 6 +++--- apple/iOS/platform.m | 12 ++++-------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/apple/iOS/platform.h b/apple/iOS/platform.h index 0bf7845ef6..7479e3c2b4 100644 --- a/apple/iOS/platform.h +++ b/apple/iOS/platform.h @@ -37,6 +37,9 @@ const void* apple_get_frontend_settings(void); @interface RetroArch_iOS : UINavigationController +@property (nonatomic) UIWindow* window; +@property (nonatomic) NSString* documentsDirectory; // e.g. /var/mobile/Documents + + (RetroArch_iOS*)get; - (void)showGameView; @@ -45,9 +48,6 @@ const void* apple_get_frontend_settings(void); - (void)unloadingCore; - (void)refreshSystemConfig; - -@property (nonatomic) NSString* documentsDirectory; // e.g. /var/mobile/Documents - @end // modes are: keyboard, icade and btstack diff --git a/apple/iOS/platform.m b/apple/iOS/platform.m index 789f7627d7..54d166eb93 100644 --- a/apple/iOS/platform.m +++ b/apple/iOS/platform.m @@ -165,10 +165,6 @@ static void handle_touch_event(NSArray* touches) @end @implementation RetroArch_iOS -{ - UIWindow* _window; - NSString* _path; -} + (RetroArch_iOS*)get { @@ -185,9 +181,9 @@ static void handle_touch_event(NSArray* touches) [self setDelegate:self]; // Setup window - _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [self showPauseMenu:self]; - [_window makeKeyAndVisible]; + [self.window makeKeyAndVisible]; // Build system paths and test permissions self.documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; @@ -278,7 +274,7 @@ static void handle_touch_event(NSArray* touches) [self setToolbarHidden:true animated:NO]; [[UIApplication sharedApplication] setStatusBarHidden:true withAnimation:UIStatusBarAnimationNone]; [[UIApplication sharedApplication] setIdleTimerDisabled:true]; - [_window setRootViewController:[RAGameView get]]; + [self.window setRootViewController:[RAGameView get]]; g_extern.is_paused = false; } @@ -287,7 +283,7 @@ static void handle_touch_event(NSArray* touches) g_extern.is_paused = true; [[UIApplication sharedApplication] setStatusBarHidden:false withAnimation:UIStatusBarAnimationNone]; [[UIApplication sharedApplication] setIdleTimerDisabled:false]; - [_window setRootViewController:self]; + [self.window setRootViewController:self]; } - (void)loadingCore:(NSString*)core withFile:(const char*)file