Merge pull request #159 from maddox/non-jailbreak

Enable for Non-Jailbroken Phones
This commit is contained in:
Squarepusher 2013-03-20 20:48:01 -07:00
commit e1aff3cfa6
3 changed files with 8 additions and 4 deletions

View File

@ -26,6 +26,8 @@
<true/>
<key>UIApplicationExitsOnSuspend</key>
<false/>
<key>UIFileSharingEnabled</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>

View File

@ -21,6 +21,9 @@
#import "input/BTStack/WiiMoteHelper.h"
#define kDOCSFOLDER [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]
@implementation RetroArch_iOS
{
UIWindow* _window;
@ -49,13 +52,12 @@
// UIApplicationDelegate
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
// TODO: Relocate this!
self.system_directory = @"/var/mobile/Library/RetroArch/";
self.system_directory = [NSString stringWithFormat:@"%@/.RetroArch", kDOCSFOLDER];
mkdir([self.system_directory UTF8String], 0755);
// Setup window
self.delegate = self;
[self pushViewController:[RADirectoryList directoryListOrGridWithPath:nil] animated:YES];
[self pushViewController:[RADirectoryList directoryListOrGridWithPath:kDOCSFOLDER] animated:YES];
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
_window.rootViewController = self;

View File

@ -67,7 +67,7 @@ NSArray* ra_ios_list_directory(NSString* path)
for(struct dirent* item = readdir(dir); item; item = readdir(dir))
{
if (strcmp(item->d_name, ".") == 0 || strcmp(item->d_name, "..") == 0)
if (strncmp(item->d_name, ".", 1) == 0)
continue;
cpath[cpath_end] = 0;