[Scummvm-cvs-logs] SF.net SVN: scummvm: [24413] scummvm/branches/branch-0-9-0/backends/ds/arm9 /source/dsmain.cpp

agent-q at users.sourceforge.net agent-q at users.sourceforge.net
Sat Oct 21 20:20:44 CEST 2006


Revision: 24413
          http://svn.sourceforge.net/scummvm/?rev=24413&view=rev
Author:   agent-q
Date:     2006-10-21 11:20:39 -0700 (Sat, 21 Oct 2006)

Log Message:
-----------
Initialise the SCSD driver twice - seems to fix SCSD problems.

Modified Paths:
--------------
    scummvm/branches/branch-0-9-0/backends/ds/arm9/source/dsmain.cpp

Modified: scummvm/branches/branch-0-9-0/backends/ds/arm9/source/dsmain.cpp
===================================================================
--- scummvm/branches/branch-0-9-0/backends/ds/arm9/source/dsmain.cpp	2006-10-21 18:19:22 UTC (rev 24412)
+++ scummvm/branches/branch-0-9-0/backends/ds/arm9/source/dsmain.cpp	2006-10-21 18:20:39 UTC (rev 24413)
@@ -1875,8 +1875,11 @@
 
 bool GBAMPAvail = false;
 
-void initGBAMP() {	
+void initGBAMP(int mode) {	
 	if (FAT_InitFiles()) {
+		if (mode == 2)	{
+			disc_IsInserted();
+		}
 		GBAMPAvail = true;
 		consolePrintf("Found flash card reader!\n");
 	} else {
@@ -1919,6 +1922,10 @@
 		swiWaitForVBlank();			// Allow you to read error before the power
 	}								// is turned off.
 
+	for (int r = 0; r < 60; r++) {
+		swiWaitForVBlank();
+	}
+
 	if (ConfMan.hasKey("disablepoweroff", "ds") && ConfMan.getBool("disablepoweroff", "ds")) {
 		while (true);
 	} else {
@@ -2116,7 +2123,7 @@
 	DSFileSystemNode* node = new DSFileSystemNode();
 	if (!node->getZip() || (!node->getZip()->isReady())) {
 		// If not found, init CF/SD driver
-		initGBAMP();
+		initGBAMP(mode);
 	}
 	delete node;
 
@@ -2126,6 +2133,7 @@
 	
 	
 //	OSystem_DS::instance();
+
 	g_system = new OSystem_DS();
 	assert(g_system);
 


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