diff --git a/GC4iOS.xcodeproj/project.pbxproj b/GC4iOS.xcodeproj/project.pbxproj index 7b01d5a..46e3926 100644 --- a/GC4iOS.xcodeproj/project.pbxproj +++ b/GC4iOS.xcodeproj/project.pbxproj @@ -19,7 +19,6 @@ CA418E061D09BEA2001B7664 /* RomTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CA418DFE1D09BEA2001B7664 /* RomTableViewController.m */; }; CA418E181D09BEB9001B7664 /* MHWDirectoryWatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = CA418E0A1D09BEB9001B7664 /* MHWDirectoryWatcher.m */; }; CA418E191D09BEB9001B7664 /* NSString+CompareToVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = CA418E0D1D09BEB9001B7664 /* NSString+CompareToVersion.m */; }; - CA418E1A1D09BEB9001B7664 /* RBVolumeButtons.m in Sources */ = {isa = PBXBuildFile; fileRef = CA418E0F1D09BEB9001B7664 /* RBVolumeButtons.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; CA418E1B1D09BEB9001B7664 /* UIDevice+Private.m in Sources */ = {isa = PBXBuildFile; fileRef = CA418E111D09BEB9001B7664 /* UIDevice+Private.m */; }; CA418E1C1D09BEB9001B7664 /* UIViewController+BackButtonHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = CA418E141D09BEB9001B7664 /* UIViewController+BackButtonHandler.m */; }; CA418E411D09BEE2001B7664 /* gcpad_a@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CA418E211D09BEE2001B7664 /* gcpad_a@2x.png */; }; @@ -132,8 +131,6 @@ CA418E0A1D09BEB9001B7664 /* MHWDirectoryWatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MHWDirectoryWatcher.m; sourceTree = ""; }; CA418E0C1D09BEB9001B7664 /* NSString+CompareToVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+CompareToVersion.h"; sourceTree = ""; }; CA418E0D1D09BEB9001B7664 /* NSString+CompareToVersion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+CompareToVersion.m"; sourceTree = ""; }; - CA418E0E1D09BEB9001B7664 /* RBVolumeButtons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RBVolumeButtons.h; sourceTree = ""; }; - CA418E0F1D09BEB9001B7664 /* RBVolumeButtons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RBVolumeButtons.m; sourceTree = ""; }; CA418E101D09BEB9001B7664 /* UIDevice+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIDevice+Private.h"; sourceTree = ""; }; CA418E111D09BEB9001B7664 /* UIDevice+Private.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIDevice+Private.m"; sourceTree = ""; }; CA418E121D09BEB9001B7664 /* UITapticEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITapticEngine.h; sourceTree = ""; }; @@ -343,8 +340,6 @@ children = ( CA418E0C1D09BEB9001B7664 /* NSString+CompareToVersion.h */, CA418E0D1D09BEB9001B7664 /* NSString+CompareToVersion.m */, - CA418E0E1D09BEB9001B7664 /* RBVolumeButtons.h */, - CA418E0F1D09BEB9001B7664 /* RBVolumeButtons.m */, CA418E101D09BEB9001B7664 /* UIDevice+Private.h */, CA418E111D09BEB9001B7664 /* UIDevice+Private.m */, CA418E121D09BEB9001B7664 /* UITapticEngine.h */, @@ -645,12 +640,12 @@ isa = PBXProject; attributes = { CLASSPREFIX = GC4iOS; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0820; ORGANIZATIONNAME = GC4iOS; TargetAttributes = { CAB6604E1D09B9D600037854 = { CreatedOnToolsVersion = 7.3; - DevelopmentTeam = EYJDE3N63W; + DevelopmentTeam = 6WXZ7X2MFT; }; CAB660671D09B9D600037854 = { CreatedOnToolsVersion = 7.3; @@ -754,7 +749,6 @@ CA418E011D09BEA2001B7664 /* GCAdapteriOS.cpp in Sources */, CA418E001D09BEA2001B7664 /* DolphinGame.m in Sources */, CA418E1B1D09BEB9001B7664 /* UIDevice+Private.m in Sources */, - CA418E1A1D09BEB9001B7664 /* RBVolumeButtons.m in Sources */, CA418E051D09BEA2001B7664 /* GameTableView.m in Sources */, CA418E191D09BEB9001B7664 /* NSString+CompareToVersion.m in Sources */, ); @@ -825,8 +819,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -848,7 +844,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -870,8 +866,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -887,7 +885,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -898,14 +896,11 @@ CAB6607D1D09B9D600037854 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - arm64, - ); ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon${BUNDLE_ICON_SET_SUFFIX}"; CLANG_CXX_LANGUAGE_STANDARD = "c++14"; CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/GC4iOS/Supporting Files/Entitlements.plist"; CODE_SIGN_IDENTITY = "iPhone Developer"; + DEVELOPMENT_TEAM = 6WXZ7X2MFT; ENABLE_BITCODE = NO; GCC_OPTIMIZATION_LEVEL = fast; HEADER_SEARCH_PATHS = ( @@ -913,7 +908,7 @@ "$(SRCROOT)/Dolphin/Include", ); INFOPLIST_FILE = GC4iOS/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -929,22 +924,19 @@ CAB6607E1D09B9D600037854 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - "$(ARCHS_STANDARD)", - arm64, - ); ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon${BUNDLE_ICON_SET_SUFFIX}"; CLANG_CXX_LANGUAGE_STANDARD = "c++14"; CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/GC4iOS/Supporting Files/Entitlements.plist"; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = 6WXZ7X2MFT; ENABLE_BITCODE = NO; HEADER_SEARCH_PATHS = ( "$(SRCROOT)/GC4iOS", "$(SRCROOT)/Dolphin/Include", ); INFOPLIST_FILE = GC4iOS/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", diff --git a/GC4iOS/AppDelegate.m b/GC4iOS/AppDelegate.m index dcd2019..1e49434 100644 --- a/GC4iOS/AppDelegate.m +++ b/GC4iOS/AppDelegate.m @@ -3,7 +3,6 @@ // Refer to the license.txt provided #import "AppDelegate.h" -#import "LZMAExtractor.h" @implementation AppDelegate @@ -16,8 +15,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N attributes:nil error:nil]; } - [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; - [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; + [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; syscall(26, -1, 0, 0, 0); //Allows mapping executable pages for JIT return YES; } diff --git a/GC4iOS/Assets.xcassets/AppIcon.appiconset/AppIcon29x29.png b/GC4iOS/Assets.xcassets/AppIcon.appiconset/AppIcon29x29.png deleted file mode 100644 index db7be57..0000000 Binary files a/GC4iOS/Assets.xcassets/AppIcon.appiconset/AppIcon29x29.png and /dev/null differ diff --git a/GC4iOS/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x-1.png b/GC4iOS/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x-1.png deleted file mode 100644 index e6c379a..0000000 Binary files a/GC4iOS/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x-1.png and /dev/null differ diff --git a/GC4iOS/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png b/GC4iOS/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png deleted file mode 100644 index e6c379a..0000000 Binary files a/GC4iOS/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png and /dev/null differ diff --git a/GC4iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/GC4iOS/Assets.xcassets/AppIcon.appiconset/Contents.json index fbebc68..9b43ccd 100644 --- a/GC4iOS/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/GC4iOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "size" : "29x29", "idiom" : "iphone", @@ -36,6 +46,16 @@ "filename" : "Icon-60.0@3x.png", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "size" : "29x29", "idiom" : "ipad", diff --git a/GC4iOS/Assets.xcassets/AppIconDebug.appiconset/Contents.json b/GC4iOS/Assets.xcassets/AppIconDebug.appiconset/Contents.json index d4c8ee8..c1467cb 100644 --- a/GC4iOS/Assets.xcassets/AppIconDebug.appiconset/Contents.json +++ b/GC4iOS/Assets.xcassets/AppIconDebug.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "size" : "29x29", "idiom" : "iphone", @@ -54,6 +64,16 @@ "filename" : "Icon-60.0@3x.png", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "size" : "29x29", "idiom" : "ipad", diff --git a/GC4iOS/Base.lproj/Main.storyboard b/GC4iOS/Base.lproj/Main.storyboard index a531fb3..04041c3 100644 --- a/GC4iOS/Base.lproj/Main.storyboard +++ b/GC4iOS/Base.lproj/Main.storyboard @@ -1,8 +1,12 @@ - - + + + + + - + + @@ -13,9 +17,9 @@ - + - + @@ -32,15 +36,15 @@ - + - + - - + + - + @@ -57,4 +61,9 @@ + + + + + diff --git a/GC4iOS/Info.plist b/GC4iOS/Info.plist index beda2e6..6b711ba 100644 --- a/GC4iOS/Info.plist +++ b/GC4iOS/Info.plist @@ -31,7 +31,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.1.3 + 0.1.4 CFBundleSignature ???? CFBundleVersion diff --git a/GC4iOS/UI/EmulatorViewController.mm b/GC4iOS/UI/EmulatorViewController.mm index 5be7769..020a19f 100644 --- a/GC4iOS/UI/EmulatorViewController.mm +++ b/GC4iOS/UI/EmulatorViewController.mm @@ -130,4 +130,8 @@ - (void)didReceiveMemoryWarning [super didReceiveMemoryWarning]; } +-(UIStatusBarStyle)preferredStatusBarStyle{ + return UIStatusBarStyleLightContent; +} + @end diff --git a/GC4iOS/UI/RomTableViewController.m b/GC4iOS/UI/RomTableViewController.m index 2b9ca19..a10bf44 100644 --- a/GC4iOS/UI/RomTableViewController.m +++ b/GC4iOS/UI/RomTableViewController.m @@ -141,4 +141,8 @@ - (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*) } } +-(UIStatusBarStyle)preferredStatusBarStyle{ + return UIStatusBarStyleLightContent; +} + @end diff --git a/GC4iOS/Utilities/Misc/RBVolumeButtons.h b/GC4iOS/Utilities/Misc/RBVolumeButtons.h deleted file mode 100755 index 673204d..0000000 --- a/GC4iOS/Utilities/Misc/RBVolumeButtons.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// RBVolumeButtons.h -// VolumeSnap -// -// Created by Randall Brown on 11/17/11. -// Copyright (c) 2011 __MyCompanyName__. All rights reserved. -// - -#import - -@interface RBVolumeButtons : NSObject - -@property (nonatomic, copy) dispatch_block_t upBlock; -@property (nonatomic, copy) dispatch_block_t downBlock; -@property (nonatomic, readonly) float launchVolume; - -- (void)startStealingVolumeButtonEvents; -- (void)stopStealingVolumeButtonEvents; - -@end diff --git a/GC4iOS/Utilities/Misc/RBVolumeButtons.m b/GC4iOS/Utilities/Misc/RBVolumeButtons.m deleted file mode 100755 index 8d19a03..0000000 --- a/GC4iOS/Utilities/Misc/RBVolumeButtons.m +++ /dev/null @@ -1,208 +0,0 @@ -// -// RBVolumeButtons.m -// VolumeSnap -// -// Created by Randall Brown on 11/17/11. -// Copyright (c) 2011 __MyCompanyName__. All rights reserved. -// - -#import "RBVolumeButtons.h" -#import -#import - -@interface RBVolumeButtons() - -@property (nonatomic) BOOL isStealingVolumeButtons; -@property (nonatomic) BOOL hadToLowerVolume; -@property (nonatomic) BOOL hadToRaiseVolume; -@property (nonatomic) BOOL suspended; -@property (nonatomic, readwrite) float launchVolume; -@property (nonatomic, retain) UIView *volumeView; - -@end - -@implementation RBVolumeButtons - -static void volumeListenerCallback ( - void *inClientData, - AudioSessionPropertyID inID, - UInt32 inDataSize, - const void *inData - ){ - const float *volumePointer = inData; - float volume = *volumePointer; - - if (volume > [(RBVolumeButtons*)inClientData launchVolume]) - { - [(RBVolumeButtons*)inClientData volumeUp]; - } - else if (volume < [(RBVolumeButtons*)inClientData launchVolume]) - { - [(RBVolumeButtons*)inClientData volumeDown]; - } -} - -- (void)volumeDown -{ - AudioSessionRemovePropertyListenerWithUserData(kAudioSessionProperty_CurrentHardwareOutputVolume, volumeListenerCallback, self); - - [[MPMusicPlayerController applicationMusicPlayer] setVolume:self.launchVolume]; - - [self performSelector:@selector(initializeVolumeButtonStealer) withObject:self afterDelay:0.1]; - - if (self.downBlock) - { - self.downBlock(); - } -} - -- (void)volumeUp -{ - AudioSessionRemovePropertyListenerWithUserData(kAudioSessionProperty_CurrentHardwareOutputVolume, volumeListenerCallback, self); - - [[MPMusicPlayerController applicationMusicPlayer] setVolume:self.launchVolume]; - - [self performSelector:@selector(initializeVolumeButtonStealer) withObject:self afterDelay:0.1]; - - if (self.upBlock) - { - self.upBlock(); - } -} - -- (void)startStealingVolumeButtonEvents -{ - dispatch_async(dispatch_get_main_queue(), ^{ - NSAssert([[NSThread currentThread] isMainThread], @"This must be called from the main thread"); - - if (self.isStealingVolumeButtons) - { - return; - } - - self.isStealingVolumeButtons = YES; - - AudioSessionInitialize(NULL, NULL, NULL, NULL); - - //const UInt32 sessionCategory = kAudioSessionCategory_PlayAndRecord; - //AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory); - - AudioSessionSetActive(YES); - - self.launchVolume = [[MPMusicPlayerController applicationMusicPlayer] volume]; - self.hadToLowerVolume = self.launchVolume == 1.0; - self.hadToRaiseVolume = self.launchVolume == 0.0; - - // Avoid flashing the volume indicator - if (self.hadToLowerVolume || self.hadToRaiseVolume) - { - dispatch_async(dispatch_get_main_queue(), ^{ - if (self.hadToLowerVolume) - { - [[MPMusicPlayerController applicationMusicPlayer] setVolume:0.95]; - self.launchVolume = 0.95; - } - - if (self.hadToRaiseVolume) - { - [[MPMusicPlayerController applicationMusicPlayer] setVolume:0.05]; - self.launchVolume = 0.05; - } - }); - } - - CGRect frame = CGRectMake(0, -100, 10, 0); - self.volumeView = [[[MPVolumeView alloc] initWithFrame:frame] autorelease]; - [self.volumeView sizeToFit]; - [[[[UIApplication sharedApplication] windows] firstObject] insertSubview:self.volumeView atIndex:0]; - - [self initializeVolumeButtonStealer]; - - if (!self.suspended) - { - // Observe notifications that trigger suspend - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(suspendStealingVolumeButtonEvents:) - name:UIApplicationWillResignActiveNotification // -> Inactive - object:nil]; - - // Observe notifications that trigger resume - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(resumeStealingVolumeButtonEvents:) - name:UIApplicationDidBecomeActiveNotification // <- Active - object:nil]; - } - }); -} - -- (void)suspendStealingVolumeButtonEvents:(NSNotification *)notification -{ - if (self.isStealingVolumeButtons) - { - self.suspended = YES; // Call first! - [self stopStealingVolumeButtonEvents]; - } -} - -- (void)resumeStealingVolumeButtonEvents:(NSNotification *)notification -{ - if (self.suspended) - { - [self startStealingVolumeButtonEvents]; - self.suspended = NO; // Call last! - } -} - -- (void)stopStealingVolumeButtonEvents -{ - dispatch_async(dispatch_get_main_queue(), ^{ - NSAssert([[NSThread currentThread] isMainThread], @"This must be called from the main thread"); - - if (!self.isStealingVolumeButtons) - { - return; - } - - // Stop observing all notifications - if (!self.suspended) - { - [[NSNotificationCenter defaultCenter] removeObserver:self]; - } - - AudioSessionRemovePropertyListenerWithUserData(kAudioSessionProperty_CurrentHardwareOutputVolume, volumeListenerCallback, self); - - if (self.hadToLowerVolume) - { - [[MPMusicPlayerController applicationMusicPlayer] setVolume:1.0]; - } - - if (self.hadToRaiseVolume) - { - [[MPMusicPlayerController applicationMusicPlayer] setVolume:0.0]; - } - - [self.volumeView removeFromSuperview]; - self.volumeView = nil; - - //AudioSessionSetActive(NO); - - self.isStealingVolumeButtons = NO; - }); -} - -- (void)dealloc -{ - self.suspended = NO; - [self stopStealingVolumeButtonEvents]; - - self.upBlock = nil; - self.downBlock = nil; - [super dealloc]; -} - -- (void)initializeVolumeButtonStealer -{ - AudioSessionAddPropertyListener(kAudioSessionProperty_CurrentHardwareOutputVolume, volumeListenerCallback, self); -} - -@end diff --git a/Readme.md b/Readme.md index 64cedf7..a5a0bc6 100644 --- a/Readme.md +++ b/Readme.md @@ -2,7 +2,7 @@ GC4iOS ======= -###### Supports iOS 8.1 and up. 64 bit devices only. +###### Supports iOS 9.3 and up. 64 bit devices only. Currently GC4iOS uses Dolphin's' PowerPC Interpreter and an OpenGL backend. Most games can be loaded and run between 3 and 20 fps.