IOS: Clean the path of the Savegames directory

This commit is contained in:
Vincent Bénony 2015-12-03 12:42:02 +01:00
parent e9934b8cc4
commit 4713f76802
2 changed files with 4 additions and 2 deletions

View File

@ -94,12 +94,14 @@ int main(int argc, char **argv) {
CGRect rect = [[UIScreen mainScreen] bounds];
// Create the directory for savegames
#ifdef IPHONE_OFFICIAL
NSFileManager *fm = [NSFileManager defaultManager];
NSString *documentPath = [NSString stringWithUTF8String:iPhone_getDocumentsDir()];
NSString *savePath = [documentPath stringByAppendingPathComponent:@"savegames"];
NSString *savePath = [documentPath stringByAppendingPathComponent:@"Savegames"];
if (![fm fileExistsAtPath:savePath]) {
[fm createDirectoryAtPath:savePath withIntermediateDirectories:YES attributes:nil error:nil];
}
#endif
_window = [[UIWindow alloc] initWithFrame:rect];
[_window retain];

View File

@ -101,7 +101,7 @@ int OSystem_IPHONE::timerHandler(int t) {
void OSystem_IPHONE::initBackend() {
#ifdef IPHONE_OFFICIAL
_savefileManager = new DefaultSaveFileManager("/savegames");
_savefileManager = new DefaultSaveFileManager("/Savegames");
#else
_savefileManager = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH);
#endif