diff --git a/ios/RetroArch.xcodeproj/project.pbxproj b/ios/RetroArch.xcodeproj/project.pbxproj index 1e9aa17d5d..aed5b097af 100644 --- a/ios/RetroArch.xcodeproj/project.pbxproj +++ b/ios/RetroArch.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ 96297A1D16C6D20900E6DCE0 /* settings_list.m in Sources */ = {isa = PBXBuildFile; fileRef = 96297A1C16C6D20900E6DCE0 /* settings_list.m */; }; 96297A2416C818FF00E6DCE0 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 96297A2216C818FF00E6DCE0 /* Icon-72.png */; }; 96297A2516C818FF00E6DCE0 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 96297A2316C818FF00E6DCE0 /* Icon.png */; }; + 96297A2716C82FF100E6DCE0 /* overlays in Resources */ = {isa = PBXBuildFile; fileRef = 96297A2616C82FF100E6DCE0 /* overlays */; }; 96AFAE2A16C1D4EA009DE44C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96AFAE2916C1D4EA009DE44C /* UIKit.framework */; }; 96AFAE2C16C1D4EA009DE44C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96AFAE2B16C1D4EA009DE44C /* Foundation.framework */; }; 96AFAE2E16C1D4EA009DE44C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96AFAE2D16C1D4EA009DE44C /* CoreGraphics.framework */; }; @@ -95,6 +96,7 @@ 96297A1C16C6D20900E6DCE0 /* settings_list.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = settings_list.m; sourceTree = ""; }; 96297A2216C818FF00E6DCE0 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-72.png"; path = "RetroArch/Icon-72.png"; sourceTree = ""; }; 96297A2316C818FF00E6DCE0 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = RetroArch/Icon.png; sourceTree = ""; }; + 96297A2616C82FF100E6DCE0 /* overlays */ = {isa = PBXFileReference; lastKnownFileType = folder; name = overlays; path = ../media/overlays; sourceTree = ""; }; 96AFAE2516C1D4EA009DE44C /* RetroArch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RetroArch.app; sourceTree = BUILT_PRODUCTS_DIR; }; 96AFAE2916C1D4EA009DE44C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 96AFAE2B16C1D4EA009DE44C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -300,6 +302,7 @@ 96AFAE1A16C1D4EA009DE44C = { isa = PBXGroup; children = ( + 96297A2616C82FF100E6DCE0 /* overlays */, 96297A2216C818FF00E6DCE0 /* Icon-72.png */, 96297A2316C818FF00E6DCE0 /* Icon.png */, 962979F416C43B9500E6DCE0 /* ic_dir.png */, @@ -722,6 +725,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 96297A2716C82FF100E6DCE0 /* overlays in Resources */, 96AFAE3816C1D4EA009DE44C /* InfoPlist.strings in Resources */, 96AFAE4016C1D4EA009DE44C /* Default.png in Resources */, 96AFAE4216C1D4EA009DE44C /* Default@2x.png in Resources */, diff --git a/ios/RetroArch/module_list.m b/ios/RetroArch/module_list.m index f898c1b12a..758ea06222 100644 --- a/ios/RetroArch/module_list.m +++ b/ios/RetroArch/module_list.m @@ -6,6 +6,16 @@ // Copyright (c) 2013 RetroArch. All rights reserved. // +static void display_error_alert(NSString* message) +{ + UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"RetroArch" + message:message + delegate:nil + cancelButtonTitle:@"OK" + otherButtonTitles:nil]; + [alert show]; +} + @implementation module_list { NSArray* modules; @@ -21,8 +31,17 @@ @"modules"]; modules = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:module_dir error:nil]; - modules = [module_dir stringsByAppendingPaths:modules]; - modules = [modules pathsMatchingExtensions:[NSArray arrayWithObject:@"dylib"]]; + + if (modules != nil) + { + modules = [module_dir stringsByAppendingPaths:modules]; + modules = [modules pathsMatchingExtensions:[NSArray arrayWithObject:@"dylib"]]; + } + + if (modules == nil || [modules count] == 0) + { + display_error_alert(@"No libretro cores were found."); + } [self setTitle:@"Choose Emulator"]; self.navigationItem.rightBarButtonItem = [RetroArch_iOS get].settings_button;