[Scummvm-cvs-logs] SF.net SVN: scummvm: [20556] scummvm/trunk/backends/PalmOS/Src/app.cpp

chrilith at users.sourceforge.net chrilith at users.sourceforge.net
Sat Feb 11 10:14:01 CET 2006


Revision: 20556
Author:   chrilith
Date:     2006-02-11 10:12:51 -0800 (Sat, 11 Feb 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm?rev=20556&view=rev

Log Message:
-----------
Fixed default volRefNum value
- Init MathLib only on non-ARM devices
- Added scummvm header
- Removed obsolete code

Modified Paths:
--------------
    scummvm/trunk/backends/PalmOS/Src/app.cpp
Modified: scummvm/trunk/backends/PalmOS/Src/app.cpp
===================================================================
--- scummvm/trunk/backends/PalmOS/Src/app.cpp	2006-02-11 18:08:47 UTC (rev 20555)
+++ scummvm/trunk/backends/PalmOS/Src/app.cpp	2006-02-11 18:12:51 UTC (rev 20556)
@@ -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$
+ *
+ */
+
 #include <PalmOS.h>
 #include <SonyClie.h>
 
@@ -223,7 +247,7 @@
 	gVars->indicator.on	= 255;
 	gVars->indicator.off = 0;
 	gVars->HRrefNum = sysInvalidRefNum;
-	gVars->VFS.volRefNum = sysInvalidRefNum;
+	gVars->VFS.volRefNum = vfsInvalidVolRef;
 	gVars->slkRefNum = sysInvalidRefNum;
 	gVars->options = kOptNone;
 
@@ -241,7 +265,7 @@
 		// reset all elements
 		MemSet(gPrefs, dataSize, 0);
 
-		gPrefs->card.volRefNum = sysInvalidRefNum;
+		gPrefs->card.volRefNum = vfsInvalidVolRef;
 		gPrefs->card.cacheSize = 4096;
 		gPrefs->card.useCache = true;
 		gPrefs->card.showLED = true;
@@ -251,15 +275,16 @@
 		gPrefs->debug = false;
 		gPrefs->exitLauncher = true;
 		gPrefs->stdPalette = OPTIONS_TST(kOptDeviceOS5);
-		gPrefs->arm = OPTIONS_TST(kOptDeviceARM);
 		gPrefs->stylusClick = true;
 		
 	} else {
 		PrefGetAppPreferences(appFileCreator, appPrefID, gPrefs, &dataSize, true);
 	}
 
-	error = AppStartCheckMathLib();
-	if (error) return (error);
+	if (!OPTIONS_TST(kOptDeviceARM)) {
+		error = AppStartCheckMathLib();
+		if (error) return (error);
+	}
 
 	error = AppStartCheckHRmode();
 	if (error) return (error);
@@ -267,7 +292,7 @@
 	bDirectMode = (AppStartLoadSkin() != errNone);
 
 	// if volref previously defined, check if it's a valid one
-	if (gPrefs->card.volRefNum != sysInvalidRefNum) {
+	if (gPrefs->card.volRefNum != vfsInvalidVolRef) {
 		VolumeInfoType volInfo;
 		Err err = VFSVolumeInfo(gPrefs->card.volRefNum, &volInfo);
 		if (err)
@@ -275,7 +300,7 @@
 	}
 	else
 		gPrefs->card.volRefNum = parseCards();
-	if (gPrefs->card.volRefNum != sysInvalidRefNum)
+	if (gPrefs->card.volRefNum != vfsInvalidVolRef)
 		CardSlotCreateDirs();
 
 	// open games database
@@ -286,11 +311,6 @@
 	AppStartCheckScreenSize();
 	AppStartCheckNotify(); 		// not fatal error if not avalaible
 
-	if (!error)
-		if (bDirectMode)
-			// force ARM option if bDirectMode
-			gPrefs->arm = OPTIONS_TST(kOptDeviceARM);
-
 	return error;
 }
 
@@ -345,7 +365,8 @@
 
 	// stop all
 	AppStopCheckNotify();
-	AppStopMathLib();
+	if (!OPTIONS_TST(kOptDeviceARM))
+		AppStopMathLib();
 	AppStopHRMode();
 
 	if (!bLaunched)







More information about the Scummvm-git-logs mailing list