[Scummvm-cvs-logs] SF.net SVN: scummvm:[48328] scummvm/branches/branch-1-1-0/backends/platform /ds/arm9/source/dsmain.cpp
agent-q at users.sourceforge.net
agent-q at users.sourceforge.net
Sat Mar 20 18:05:59 CET 2010
Revision: 48328
http://scummvm.svn.sourceforge.net/scummvm/?rev=48328&view=rev
Author: agent-q
Date: 2010-03-20 17:05:59 +0000 (Sat, 20 Mar 2010)
Log Message:
-----------
DS: Fix hold select button for main menu timer bug
Modified Paths:
--------------
scummvm/branches/branch-1-1-0/backends/platform/ds/arm9/source/dsmain.cpp
Modified: scummvm/branches/branch-1-1-0/backends/platform/ds/arm9/source/dsmain.cpp
===================================================================
--- scummvm/branches/branch-1-1-0/backends/platform/ds/arm9/source/dsmain.cpp 2010-03-20 16:52:51 UTC (rev 48327)
+++ scummvm/branches/branch-1-1-0/backends/platform/ds/arm9/source/dsmain.cpp 2010-03-20 17:05:59 UTC (rev 48328)
@@ -1642,28 +1642,27 @@
}
- static int selectHoldCount = 0;
- static const int SELECT_HOLD_TIME = 60;
+ static int selectTimeDown = -1;
+ static const int SELECT_HOLD_TIME = 1000;
- if ((getKeysHeld() & KEY_SELECT)) {
- selectHoldCount++;
+ if (getKeysDown() & KEY_SELECT) {
+ selectTimeDown = getMillis();
+ }
- if (selectHoldCount == SELECT_HOLD_TIME) {
+ if (getKeysHeld() & KEY_SELECT) {
+ if (getMillis() - selectTimeDown >= SELECT_HOLD_TIME) {
// Hold select down for one second - show GMM
g_engine->openMainMenuDialog();
}
- } else {
- selectHoldCount = 0;
}
-
-
if (getKeysReleased() & KEY_SELECT) {
- if (selectHoldCount < SELECT_HOLD_TIME) {
+ if (getMillis() - selectTimeDown < SELECT_HOLD_TIME) {
// Just pressed select - show DS options screen
showOptionsDialog();
}
}
+
}
if (!getIndyFightState() && !((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) && (getKeysDown() & KEY_X)) {
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