IOS: Clean the path of the Savegames directory
This commit is contained in:
parent
e9934b8cc4
commit
4713f76802
2 changed files with 4 additions and 2 deletions
|
@ -94,12 +94,14 @@ int main(int argc, char **argv) {
|
||||||
CGRect rect = [[UIScreen mainScreen] bounds];
|
CGRect rect = [[UIScreen mainScreen] bounds];
|
||||||
|
|
||||||
// Create the directory for savegames
|
// Create the directory for savegames
|
||||||
|
#ifdef IPHONE_OFFICIAL
|
||||||
NSFileManager *fm = [NSFileManager defaultManager];
|
NSFileManager *fm = [NSFileManager defaultManager];
|
||||||
NSString *documentPath = [NSString stringWithUTF8String:iPhone_getDocumentsDir()];
|
NSString *documentPath = [NSString stringWithUTF8String:iPhone_getDocumentsDir()];
|
||||||
NSString *savePath = [documentPath stringByAppendingPathComponent:@"savegames"];
|
NSString *savePath = [documentPath stringByAppendingPathComponent:@"Savegames"];
|
||||||
if (![fm fileExistsAtPath:savePath]) {
|
if (![fm fileExistsAtPath:savePath]) {
|
||||||
[fm createDirectoryAtPath:savePath withIntermediateDirectories:YES attributes:nil error:nil];
|
[fm createDirectoryAtPath:savePath withIntermediateDirectories:YES attributes:nil error:nil];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_window = [[UIWindow alloc] initWithFrame:rect];
|
_window = [[UIWindow alloc] initWithFrame:rect];
|
||||||
[_window retain];
|
[_window retain];
|
||||||
|
|
|
@ -101,7 +101,7 @@ int OSystem_IPHONE::timerHandler(int t) {
|
||||||
|
|
||||||
void OSystem_IPHONE::initBackend() {
|
void OSystem_IPHONE::initBackend() {
|
||||||
#ifdef IPHONE_OFFICIAL
|
#ifdef IPHONE_OFFICIAL
|
||||||
_savefileManager = new DefaultSaveFileManager("/savegames");
|
_savefileManager = new DefaultSaveFileManager("/Savegames");
|
||||||
#else
|
#else
|
||||||
_savefileManager = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH);
|
_savefileManager = new DefaultSaveFileManager(SCUMMVM_SAVE_PATH);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue