diff options
Diffstat (limited to 'backends/platform/psp/osys_psp.cpp')
| -rw-r--r-- | backends/platform/psp/osys_psp.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 6e9b5980d4..69be0abcb2 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -98,7 +98,20 @@ OSystem_PSP::~OSystem_PSP() { void OSystem_PSP::initBackend() { - _savefile = new DefaultSaveFileManager(); + _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); |
