diff options
| -rw-r--r-- | backends/PalmOS/Src/forms/formCards.cpp | 34 | ||||
| -rw-r--r-- | backends/PalmOS/Src/forms/formCards.h | 24 | 
2 files changed, 54 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"); diff --git a/backends/PalmOS/Src/forms/formCards.h b/backends/PalmOS/Src/forms/formCards.h index 4ec9795c2f..956ef86340 100644 --- a/backends/PalmOS/Src/forms/formCards.h +++ b/backends/PalmOS/Src/forms/formCards.h @@ -1,3 +1,27 @@ +/* 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$ + * + */ +  #ifndef __FORMCARDS_H__  #define __FORMCARDS_H__  | 
