[Scummvm-cvs-logs] CVS: scummvm/backends/PalmOS/Src games.cpp,1.5,1.6 extend.h,1.11,1.12
Chris Apers
chrilith at users.sourceforge.net
Thu Feb 5 05:50:04 CET 2004
Update of /cvsroot/scummvm/scummvm/backends/PalmOS/Src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15147
Modified Files:
games.cpp extend.h
Log Message:
Fixed memory card import
Index: games.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/games.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- games.cpp 20 Jan 2004 14:03:50 -0000 1.5
+++ games.cpp 5 Feb 2004 13:46:28 -0000 1.6
@@ -24,6 +24,7 @@
#include <VFSMgr.h>
#include <ctype.h>
+#include "globals.h"
#include "start.h"
#include "games.h"
#include "skin.h"
@@ -184,7 +185,6 @@
if (!e) {
UInt16 oCardNo, nCardNo;
LocalID oDbID, nDbID;
- UInt32 type = 'ODAT'; // change the type to avoid the old db to be loaded in case of crash
VFSFileClose(file);
if (gPrefs->card.confirmMoveDB)
@@ -197,19 +197,12 @@
// get current db info and rename it
DmOpenDatabaseInfo(gameDB, &oDbID, 0, 0, &oCardNo, 0);
GamCloseDatabase(true);
- DmSetDatabaseInfo(oCardNo, oDbID, "ScummVM-Data-old.pdb", 0, 0, 0, 0, 0, 0, 0, 0, &type, 0);
+ e = DmDeleteDatabase(oCardNo, oDbID);
+
+ if (!e)
+ if (e = VFSImportDatabaseFromFile(gPrefs->card.volRefNum, "/Palm/Programs/ScummVM/listdata.pdb", &nCardNo, &nDbID))
+ FrmCustomAlert(FrmErrorAlert, "Failed to import games database from memory card.", 0, 0);
-
- e = VFSImportDatabaseFromFile(gPrefs->card.volRefNum, "/Palm/Programs/ScummVM/listdata.pdb", &nCardNo, &nDbID);
- if (e) {
- type = 'DATA';
- FrmCustomAlert(FrmErrorAlert, "Failed to import games database from memory card.", 0, 0);
- DmSetDatabaseInfo(oCardNo, oDbID, "ScummVM-Data.pdb", 0, 0, 0, 0, 0, 0, 0, 0, &type, 0);
- } else {
- // in OS5 the localID may change ... ? (cause Free Handle error) TODO : check if this is still required, crash now with tapwave !!!
-// oDbID = DmFindDatabase (oCardNo, "ScummVM-Data-old.pdb");
- e = DmDeleteDatabase(oCardNo, oDbID);
- }
GamOpenDatabase();
}
}
Index: extend.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/PalmOS/Src/extend.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- extend.h 20 Jan 2004 14:01:45 -0000 1.11
+++ extend.h 5 Feb 2004 13:46:28 -0000 1.12
@@ -36,7 +36,8 @@
// PalmOS
#define DISABLE_TAPWAVE
-#define DEBUG_ARM
+#define DISABLE_ARM
+//#define DEBUG_ARM
int main(int argc, char **argv);
More information about the Scummvm-git-logs
mailing list