aboutsummaryrefslogtreecommitdiff
path: root/backends/saves
diff options
context:
space:
mode:
authorJoost Peters2009-09-23 16:11:23 +0000
committerJoost Peters2009-09-23 16:11:23 +0000
commit6a5bd81599fbafe8edc92add8316eba74504e49d (patch)
tree57de3e785bdbe0dfa83ab38131f546a3a2f2a89d /backends/saves
parent227e4e65df7093b2be9b45106b529761a13068dd (diff)
downloadscummvm-rg350-6a5bd81599fbafe8edc92add8316eba74504e49d.tar.gz
scummvm-rg350-6a5bd81599fbafe8edc92add8316eba74504e49d.tar.bz2
scummvm-rg350-6a5bd81599fbafe8edc92add8316eba74504e49d.zip
PSP: improved suspend/resume support [patch from bluddy]
svn-id: r44276
Diffstat (limited to 'backends/saves')
-rw-r--r--backends/saves/psp/psp-saves.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/saves/psp/psp-saves.cpp b/backends/saves/psp/psp-saves.cpp
index f759d3f531..bba27762cd 100644
--- a/backends/saves/psp/psp-saves.cpp
+++ b/backends/saves/psp/psp-saves.cpp
@@ -26,6 +26,7 @@
#ifdef __PSP__
#include "backends/saves/psp/psp-saves.h"
+#include "backends/platform/psp/powerman.h"
#include "common/config-manager.h"
#include "common/savefile.h"
@@ -49,6 +50,8 @@ void PSPSaveFileManager::checkPath(const Common::FSNode &dir) {
const char *savePath = dir.getPath().c_str();
clearError();
+ PowerMan.beginCriticalSection();
+
//check if the save directory exists
SceUID fd = sceIoDopen(savePath);
if (fd < 0) {
@@ -58,6 +61,8 @@ void PSPSaveFileManager::checkPath(const Common::FSNode &dir) {
//it exists, so close it again.
sceIoDclose(fd);
}
+
+ PowerMan.endCriticalSection();
}
#endif