diff options
author | Chris Apers | 2006-02-11 18:16:19 +0000 |
---|---|---|
committer | Chris Apers | 2006-02-11 18:16:19 +0000 |
commit | a474940a337900af70c1c2a7c01e8df7ff2d9c34 (patch) | |
tree | c0bc1dedd246362da8b3fe255c33a40c941fad2d /backends/PalmOS/Src/forms/formCards.cpp | |
parent | dfa1a254f60401acf892b2890a64dafb82d7b0dd (diff) | |
download | scummvm-rg350-a474940a337900af70c1c2a7c01e8df7ff2d9c34.tar.gz scummvm-rg350-a474940a337900af70c1c2a7c01e8df7ff2d9c34.tar.bz2 scummvm-rg350-a474940a337900af70c1c2a7c01e8df7ff2d9c34.zip |
- Added NVFS support
- Fixed default volRefNum value
- Added scummvm header
svn-id: r20557
Diffstat (limited to 'backends/PalmOS/Src/forms/formCards.cpp')
-rw-r--r-- | backends/PalmOS/Src/forms/formCards.cpp | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/backends/PalmOS/Src/forms/formCards.cpp b/backends/PalmOS/Src/forms/formCards.cpp index ece4fc4c34..1c22ea647a 100644 --- a/backends/PalmOS/Src/forms/formCards.cpp +++ b/backends/PalmOS/Src/forms/formCards.cpp @@ -1,5 +1,30 @@ +/* ScummVM - Scumm Interpreter + * Copyright (C) 2001 Ludvig Strigeus + * Copyright (C) 2001-2006 The ScummVM project + * Copyright (C) 2002-2006 Chris Apers - PalmOS Backend + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + #include <PalmOS.h> #include <VFSMgr.h> +#include <PmPalmOSNVFS.h> #include "start.h" #include "formTabs.h" @@ -42,7 +67,7 @@ static UInt16 CardSlotFillList(Boolean getRefNum = false) { Err err; UInt16 index; UInt16 volRefNum; - UInt32 volIterator = vfsIteratorStart; + UInt32 volIterator = vfsIteratorStart|vfsIncludePrivateVolumes; UInt8 counter = 0; UInt32 other = 1; @@ -56,6 +81,7 @@ static UInt16 CardSlotFillList(Boolean getRefNum = false) { if (!err) { Char labelP[expCardInfoStringMaxLen+1]; + MemSet(labelP, expCardInfoStringMaxLen+1, 0); err = VFSVolumeGetLabel(volRefNum, labelP, expCardInfoStringMaxLen+1); if (err || StrLen(labelP) == 0) { // if no label try to retreive card type @@ -121,7 +147,7 @@ static UInt16 CardSlotFillList(Boolean getRefNum = false) { if (!getRefNum) CardSlotFreeList(); else - return sysInvalidRefNum; + return vfsInvalidVolRef; } return counter; @@ -202,7 +228,7 @@ static UInt16 ConfigTabSave() { listP = (ListType *)GetObjectPtr(TabCardConfigSlotList); selected = LstGetSelection(listP); if (selected == -1) { - gPrefs->card.volRefNum = sysInvalidRefNum; + gPrefs->card.volRefNum = vfsInvalidVolRef; } else if (gPrefs->card.volRefNum != cardsInfo[selected].volRefNum) { updateCode = frmRedrawUpdateMSImport; gPrefs->card.volRefNum = cardsInfo[selected].volRefNum; @@ -327,7 +353,7 @@ Boolean CardSlotFormHandleEvent(EventPtr eventP) { } void CardSlotCreateDirs() { - if (gPrefs->card.volRefNum != sysInvalidRefNum) { + if (gPrefs->card.volRefNum != vfsInvalidVolRef) { VFSDirCreate(gPrefs->card.volRefNum, "/PALM"); VFSDirCreate(gPrefs->card.volRefNum, "/PALM/Programs"); VFSDirCreate(gPrefs->card.volRefNum, "/PALM/Programs/ScummVM"); |