[Scummvm-cvs-logs] SF.net SVN: scummvm:[39969] scummvm/branches/branch-0-13-0/backends/ platform/ds/arm9/source

agent-q at users.sourceforge.net agent-q at users.sourceforge.net
Thu Apr 16 23:48:59 CEST 2009


Revision: 39969
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39969&view=rev
Author:   agent-q
Date:     2009-04-16 21:48:59 +0000 (Thu, 16 Apr 2009)

Log Message:
-----------
DS: Implemented openConfigFileForReading()/Writing()

Modified Paths:
--------------
    scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/dsmain.cpp
    scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/osystem_ds.cpp
    scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/osystem_ds.h

Modified: scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/dsmain.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/dsmain.cpp	2009-04-16 21:47:37 UTC (rev 39968)
+++ scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/dsmain.cpp	2009-04-16 21:48:59 UTC (rev 39969)
@@ -2925,7 +2925,7 @@
 void dsExceptionHandler() {
 	consolePrintf("Blue screen of death");
 	setExceptionHandler(NULL);
-	while(1);
+//	while(1);
 
 	u32	currentMode = getCPSR() & 0x1f;
 	u32 thumbState = ((*(u32*)0x027FFD90) & 0x20);
@@ -3064,7 +3064,7 @@
 	consolePrintf("-------------------------------\n");
 	consolePrintf("ScummVM DS\n");
 	consolePrintf("Ported by Neil Millstone\n");
-	consolePrintf("Version 0.13.1 beta2 ");
+	consolePrintf("Version 0.13.1 beta3 ");
 #if defined(DS_BUILD_A)
 	consolePrintf("build A\n");
 	consolePrintf("Lucasarts SCUMM games (SCUMM)\n");
@@ -3217,26 +3217,9 @@
 //	printf("'%s'", Common::ConfigManager::kTransientDomain.c_str());
 	//printf("'%s'", Common::ConfigManager::kApplicationDomain.c_str());
 
-#if defined(DS_BUILD_A)
-	const char *argv[] = {"/scummvmds"};
-#elif defined(DS_BUILD_B)
-	const char *argv[] = {"/scummvmds", "--config=scummvmb.ini"};
-#elif defined(DS_BUILD_C)
-	const char *argv[] = {"/scummvmds", "--config=scummvmc.ini"};
-#elif defined(DS_BUILD_D)
-	const char *argv[] = {"/scummvmds", "--config=scummvmd.ini"};
-#elif defined(DS_BUILD_E)
-	const char *argv[] = {"/scummvmds", "--config=scummvme.ini"};
-#elif defined(DS_BUILD_F)
-	const char *argv[] = {"/scummvmds", "--config=scummvmf.ini"};
-#elif defined(DS_BUILD_G)
-	const char *argv[] = {"/scummvmds", "--config=scummvmg.ini"};
-#elif defined(DS_BUILD_H)
-	const char *argv[] = {"/scummvmds", "--config=scummvmh.ini"};
-#endif
 
 	while (1) {
-		scummvm_main(ARRAYSIZE(argv), (char **) &argv);
+		scummvm_main(0, NULL);
 		powerOff();
 	}
 

Modified: scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/osystem_ds.cpp
===================================================================
--- scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/osystem_ds.cpp	2009-04-16 21:47:37 UTC (rev 39968)
+++ scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/osystem_ds.cpp	2009-04-16 21:48:59 UTC (rev 39969)
@@ -38,6 +38,26 @@
 #include "touchkeyboard.h"
 #include "backends/fs/ds/ds-fs-factory.h"
 
+
+#if defined(DS_BUILD_A)
+#define DEFAULT_CONFIG_FILE "scummvm.ini"
+#elif defined(DS_BUILD_B)
+#define DEFAULT_CONFIG_FILE "scummvmb.ini"
+#elif defined(DS_BUILD_C)
+#define DEFAULT_CONFIG_FILE "scummvmc.ini"
+#elif defined(DS_BUILD_D)
+#define DEFAULT_CONFIG_FILE "scummvmd.ini"
+#elif defined(DS_BUILD_E)
+#define DEFAULT_CONFIG_FILE "scummvme.ini"
+#elif defined(DS_BUILD_F)
+#define DEFAULT_CONFIG_FILE "scummvmf.ini"
+#elif defined(DS_BUILD_G)
+#define DEFAULT_CONFIG_FILE "scummvmg.ini"
+#elif defined(DS_BUILD_H)
+#define DEFAULT_CONFIG_FILE "scummvmh.ini"
+#endif
+
+
 OSystem_DS* OSystem_DS::_instance = NULL;
 
 OSystem_DS::OSystem_DS()
@@ -770,4 +790,14 @@
 }
 
 
+Common::SeekableReadStream *OSystem_DS::openConfigFileForReading() {
+	Common::FSNode file(DEFAULT_CONFIG_FILE);
+	return file.openForReading();
+}
 
+Common::WriteStream *OSystem_DS::openConfigFileForWriting() {
+	Common::FSNode file(DEFAULT_CONFIG_FILE);
+	return file.openForWriting();
+}
+
+

Modified: scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/osystem_ds.h
===================================================================
--- scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/osystem_ds.h	2009-04-16 21:47:37 UTC (rev 39968)
+++ scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/osystem_ds.h	2009-04-16 21:48:59 UTC (rev 39969)
@@ -183,6 +183,10 @@
 	FilesystemFactory *getFilesystemFactory();
 
 	void refreshCursor();
+
+	Common::SeekableReadStream* openConfigFileForReading();
+	Common::WriteStream* openConfigFileForWriting();
+
 };
 
 static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list