diff options
author | Chris Apers | 2003-07-23 20:17:07 +0000 |
---|---|---|
committer | Chris Apers | 2003-07-23 20:17:07 +0000 |
commit | 03e720dabee20a7eee2e9c1534ac0178d3d9dc43 (patch) | |
tree | 8a4936d2e1b38f7170e5dbb4ccbcfa7df3d2ce1f /backends/PalmOS | |
parent | fa2d02ce6d0e70e6b8200d218da1cd031234582a (diff) | |
download | scummvm-rg350-03e720dabee20a7eee2e9c1534ac0178d3d9dc43.tar.gz scummvm-rg350-03e720dabee20a7eee2e9c1534ac0178d3d9dc43.tar.bz2 scummvm-rg350-03e720dabee20a7eee2e9c1534ac0178d3d9dc43.zip |
Fix a bug with checkMSA that let the last track play even if we exit to the launcher. Also enable to use MSALib if the lib is opened by another application
svn-id: r9151
Diffstat (limited to 'backends/PalmOS')
-rw-r--r-- | backends/PalmOS/Src/palm.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/backends/PalmOS/Src/palm.cpp b/backends/PalmOS/Src/palm.cpp index c6db8a2ee5..d0ae3c65a2 100644 --- a/backends/PalmOS/Src/palm.cpp +++ b/backends/PalmOS/Src/palm.cpp @@ -921,8 +921,10 @@ void OSystem_PALMOS::quit() { // free(_sndDataP); free(_sndTempP); - if (_msaRefNum != sysInvalidRefNum) + if (_msaRefNum != sysInvalidRefNum) { + MsaStop(_msaRefNum, true); // stop the current track if any (needed if we use enforce open to prevent the track to play after exit) MsaLibClose(_msaRefNum, msaLibOpenModeAlbum); + } unload_gfx_mode(); _quit = true; @@ -1035,7 +1037,7 @@ static UInt16 checkMSA() { // Char buf[100]; // StrPrintF(buf,"MSA refNum %ld, Try to open lib ...", refNum); // FrmCustomAlert(1000,buf,0,0); -// MsaLibClose(refNum, msaLibOpenModeAlbum); + MsaLibClose(refNum, msaLibOpenModeAlbum); // try to close the lib if we previously let it open (?) error = MsaLibOpen(refNum, msaLibOpenModeAlbum); /* switch (error) { case msaErrAlreadyOpen: @@ -1051,12 +1053,11 @@ static UInt16 checkMSA() { FrmCustomAlert(1000,"expErrCardNotPresent",0,0); break; } - - if (error == msaErrAlreadyOpen) { - error = MsaLibEnforceOpen(refNum, msaLibOpenModeAlbum, msaLibCreatorID); - FrmCustomAlert(1000,"Force no error",0,0); - } -*/// error = errNone; +*/ + if (error == msaErrAlreadyOpen) + error = MsaLibEnforceOpen(refNum, msaLibOpenModeAlbum, appFileCreator); + + error = (error != msaErrStillOpen) ? error : errNone; } //} } |