diff options
-rw-r--r-- | backends/platform/psp/osys_psp.cpp | 13 | ||||
-rw-r--r-- | backends/platform/psp/psp_main.cpp | 10 |
2 files changed, 13 insertions, 10 deletions
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 30a43e80c1..69be0abcb2 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -99,6 +99,19 @@ OSystem_PSP::~OSystem_PSP() { void OSystem_PSP::initBackend() { _savefile = new DefaultSaveFileManager("ms0:/scummvm_savegames"); + + const char *savePath = _savefile->getSavePath().c_str(); + + //check if the save directory exists + SceUID fd = sceIoDopen(savePath); + if (fd < 0) { + //No? then let's create it. + sceIoMkdir(savePath, 0777); + } else { + //it exists, so close it again. + sceIoDclose(fd); + } + _timer = new DefaultTimerManager(); setTimerCallback(&timer_handler, 10); diff --git a/backends/platform/psp/psp_main.cpp b/backends/platform/psp/psp_main.cpp index d2ed59efbe..94ef63488d 100644 --- a/backends/platform/psp/psp_main.cpp +++ b/backends/platform/psp/psp_main.cpp @@ -122,16 +122,6 @@ int main(void) { SetupCallbacks(); - //check if the save directory exists - SceUID fd = sceIoDopen(SCUMMVM_SAVEPATH); - if (fd < 0) { - //No? then let's create it. - sceIoMkdir(SCUMMVM_SAVEPATH, 0777); - } else { - //it exists, so close it again. - sceIoDclose(fd); - } - static char *argv[] = { "scummvm", NULL }; static int argc = sizeof(argv)/sizeof(char *)-1; |