diff options
author | Chris Apers | 2004-02-05 13:46:28 +0000 |
---|---|---|
committer | Chris Apers | 2004-02-05 13:46:28 +0000 |
commit | acbb4b98b62833dbc7bedc0f226aada8523cccab (patch) | |
tree | c720fc3588e6409447315d869155135393cc34f3 /backends | |
parent | 39055e40c589f57d90738ed3be143be5bd70e5e0 (diff) | |
download | scummvm-rg350-acbb4b98b62833dbc7bedc0f226aada8523cccab.tar.gz scummvm-rg350-acbb4b98b62833dbc7bedc0f226aada8523cccab.tar.bz2 scummvm-rg350-acbb4b98b62833dbc7bedc0f226aada8523cccab.zip |
Fixed memory card import
svn-id: r12733
Diffstat (limited to 'backends')
-rw-r--r-- | backends/PalmOS/Src/extend.h | 3 | ||||
-rw-r--r-- | backends/PalmOS/Src/games.cpp | 19 |
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(); } } |