[Scummvm-cvs-logs] SF.net SVN: scummvm:[34327] scummvm/branches/branch-0-12-0/backends/ platform/psp

joostp at users.sourceforge.net joostp at users.sourceforge.net
Thu Sep 4 10:43:44 CEST 2008


Revision: 34327
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34327&view=rev
Author:   joostp
Date:     2008-09-04 08:43:42 +0000 (Thu, 04 Sep 2008)

Log Message:
-----------
move save directory detection/creation from main() to OSystem_PSP::initBackend()

Modified Paths:
--------------
    scummvm/branches/branch-0-12-0/backends/platform/psp/osys_psp.cpp
    scummvm/branches/branch-0-12-0/backends/platform/psp/psp_main.cpp

Modified: scummvm/branches/branch-0-12-0/backends/platform/psp/osys_psp.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/backends/platform/psp/osys_psp.cpp	2008-09-04 08:34:02 UTC (rev 34326)
+++ scummvm/branches/branch-0-12-0/backends/platform/psp/osys_psp.cpp	2008-09-04 08:43:42 UTC (rev 34327)
@@ -99,6 +99,19 @@
 
 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);
 

Modified: scummvm/branches/branch-0-12-0/backends/platform/psp/psp_main.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/backends/platform/psp/psp_main.cpp	2008-09-04 08:34:02 UTC (rev 34326)
+++ scummvm/branches/branch-0-12-0/backends/platform/psp/psp_main.cpp	2008-09-04 08:43:42 UTC (rev 34327)
@@ -122,16 +122,6 @@
 {
 	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;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list