[Scummvm-cvs-logs] SF.net SVN: scummvm: [20557] scummvm/trunk/backends/PalmOS/Src/forms
chrilith at users.sourceforge.net
chrilith at users.sourceforge.net
Sat Feb 11 10:17:02 CET 2006
Revision: 20557
Author: chrilith
Date: 2006-02-11 10:16:19 -0800 (Sat, 11 Feb 2006)
ViewCVS: http://svn.sourceforge.net/scummvm?rev=20557&view=rev
Log Message:
-----------
- Added NVFS support
- Fixed default volRefNum value
- Added scummvm header
Modified Paths:
--------------
scummvm/trunk/backends/PalmOS/Src/forms/formCards.cpp
scummvm/trunk/backends/PalmOS/Src/forms/formCards.h
Modified: scummvm/trunk/backends/PalmOS/Src/forms/formCards.cpp
===================================================================
--- scummvm/trunk/backends/PalmOS/Src/forms/formCards.cpp 2006-02-11 18:12:51 UTC (rev 20556)
+++ scummvm/trunk/backends/PalmOS/Src/forms/formCards.cpp 2006-02-11 18:16:19 UTC (rev 20557)
@@ -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 @@
Err err;
UInt16 index;
UInt16 volRefNum;
- UInt32 volIterator = vfsIteratorStart;
+ UInt32 volIterator = vfsIteratorStart|vfsIncludePrivateVolumes;
UInt8 counter = 0;
UInt32 other = 1;
@@ -56,6 +81,7 @@
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 @@
if (!getRefNum)
CardSlotFreeList();
else
- return sysInvalidRefNum;
+ return vfsInvalidVolRef;
}
return counter;
@@ -202,7 +228,7 @@
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 @@
}
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");
Modified: scummvm/trunk/backends/PalmOS/Src/forms/formCards.h
===================================================================
--- scummvm/trunk/backends/PalmOS/Src/forms/formCards.h 2006-02-11 18:12:51 UTC (rev 20556)
+++ scummvm/trunk/backends/PalmOS/Src/forms/formCards.h 2006-02-11 18:16:19 UTC (rev 20557)
@@ -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__
More information about the Scummvm-git-logs
mailing list