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

agent-q at users.sourceforge.net agent-q at users.sourceforge.net
Sat Apr 18 15:10:34 CEST 2009


Revision: 39982
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39982&view=rev
Author:   agent-q
Date:     2009-04-18 13:10:33 +0000 (Sat, 18 Apr 2009)

Log Message:
-----------
DS: 
- Fix screens not swapping back when using keyboard on menu screen and game screens swapped
- Fix cursor displaying in wrong place under certain conditions.

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

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-18 12:03:21 UTC (rev 39981)
+++ scummvm/branches/branch-0-13-0/backends/platform/ds/arm9/source/dsmain.cpp	2009-04-18 13:10:33 UTC (rev 39982)
@@ -1249,9 +1249,16 @@
 		}
 
 		// Restore the screens so they're the right way round
-		if (gameScreenSwap) {
-			POWER_CR |= POWER_SWAP_LCDS;
+		if (displayModeIs8Bit) {
+			// In 8-bit mode, detect whether the player has swapped the screens
+			// over, and restore that setting.
+			if (gameScreenSwap) {
+				POWER_CR |= POWER_SWAP_LCDS;
+			} else {
+				POWER_CR &= ~POWER_SWAP_LCDS;
+			}
 		} else {
+			// In 16-bit mode, main screen should always be on the bottom
 			POWER_CR &= ~POWER_SWAP_LCDS;
 		}
 	}
@@ -2000,19 +2007,14 @@
 
 	frameCount++;
 
-	if ((cursorEnable) && (mouseCursorVisible)) {
+	if ((cursorEnable) && (mouseCursorVisible) && !(getKeysHeld() & KEY_L) && !(getKeysHeld() & KEY_R)) {
 		if (!keyboardEnable) {
 			storedMouseX = penX;
 			storedMouseY = penY;
 		}
 
-		if (gameScreenSwap) {
-			setIcon(3, storedMouseX - mouseHotspotX, storedMouseY - mouseHotspotY, 8, 0, true);
-			setIconMain(3, 0, 0, 0, 0, false);
-		} else {
-			setIconMain(3, storedMouseX - mouseHotspotX, storedMouseY - mouseHotspotY, 8, 0, true);
-			setIcon(3, 0, 0, 0, 0, false);
-		}
+		setIconMain(3, storedMouseX - mouseHotspotX, storedMouseY - mouseHotspotY, 8, 0, true);
+		setIcon(3, 0, 0, 0, 0, false);
 	} else {
 		setIconMain(3, 0, 0, 0, 0, false);
 		setIcon(3, 0, 0, 0, 0, false);


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