aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/PalmOS/Src/extend.h3
-rw-r--r--backends/PalmOS/Src/games.cpp19
2 files changed, 8 insertions, 14 deletions
diff --git a/backends/PalmOS/Src/extend.h b/backends/PalmOS/Src/extend.h
index 1863757bea..cb03be9e09 100644
--- a/backends/PalmOS/Src/extend.h
+++ b/backends/PalmOS/Src/extend.h
@@ -36,7 +36,8 @@ extern const Char *SCUMMVM_SAVEPATH;
// PalmOS
#define DISABLE_TAPWAVE
-#define DEBUG_ARM
+#define DISABLE_ARM
+//#define DEBUG_ARM
int main(int argc, char **argv);
diff --git a/backends/PalmOS/Src/games.cpp b/backends/PalmOS/Src/games.cpp
index 33ba1a7fb2..868d87ceef 100644
--- a/backends/PalmOS/Src/games.cpp
+++ b/backends/PalmOS/Src/games.cpp
@@ -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 @@ void GamImportDatabase() {
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 @@ void GamImportDatabase() {
// 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();
}
}