[Scummvm-cvs-logs] scummvm master -> 0a9b9fe08f3b5fa8f9a505887fccd88b42f7f1b9

CeRiAl ikhatib at gmail.com
Mon Jun 27 02:24:22 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0a9b9fe08f WINCE: Added option to disable panel toggling with double tap on top of screen


Commit: 0a9b9fe08f3b5fa8f9a505887fccd88b42f7f1b9
    https://github.com/scummvm/scummvm/commit/0a9b9fe08f3b5fa8f9a505887fccd88b42f7f1b9
Author: CeRiAl (ikhatib at gmail.com)
Date: 2011-06-26T17:22:24-07:00

Commit Message:
WINCE: Added option to disable panel toggling with double tap on top of screen

Changed paths:
    backends/events/wincesdl/wincesdl-events.cpp
    backends/graphics/wincesdl/wincesdl-graphics.cpp
    backends/graphics/wincesdl/wincesdl-graphics.h
    backends/platform/wince/CEActionsPocket.cpp
    backends/platform/wince/CEActionsSmartphone.cpp



diff --git a/backends/events/wincesdl/wincesdl-events.cpp b/backends/events/wincesdl/wincesdl-events.cpp
index 4fab47a..1116cbb 100644
--- a/backends/events/wincesdl/wincesdl-events.cpp
+++ b/backends/events/wincesdl/wincesdl-events.cpp
@@ -183,7 +183,8 @@ bool WINCESdlEventSource::pollEvent(Common::Event &event) {
 				if (_tapTime) {     // second tap
 					if (_closeClick && (GetTickCount() - _tapTime < 1000)) {
 						if (event.mouse.y <= 20 &&
-						        _graphicsMan->_panelInitialized) {
+						        _graphicsMan->_panelInitialized &&
+						        !_graphicsMan->_noDoubleTapPT) {
 							// top of screen (show panel)
 							_graphicsMan->swap_panel_visibility();
 						} else if (!_graphicsMan->_noDoubleTapRMB) {
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp
index b8c8b77..2ca78ce 100644
--- a/backends/graphics/wincesdl/wincesdl-graphics.cpp
+++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp
@@ -44,7 +44,7 @@
 
 WINCESdlGraphicsManager::WINCESdlGraphicsManager(SdlEventSource *sdlEventSource)
 	: SurfaceSdlGraphicsManager(sdlEventSource),
-	  _panelInitialized(false), _noDoubleTapRMB(false),
+	  _panelInitialized(false), _noDoubleTapRMB(false), _noDoubleTapPT(false),
 	  _toolbarHighDrawn(false), _newOrientation(0), _orientationLandscape(0),
 	  _panelVisible(true), _saveActiveToolbar(NAME_MAIN_PANEL), _panelStateForced(false),
 	  _canBeAspectScaled(false), _scalersChanged(false), _saveToolbarState(false),
@@ -478,6 +478,9 @@ void WINCESdlGraphicsManager::update_game_settings() {
 
 	if (ConfMan.hasKey("no_doubletap_rightclick"))
 		_noDoubleTapRMB = ConfMan.getBool("no_doubletap_rightclick");
+
+	if (ConfMan.hasKey("no_doubletap_paneltoggle"))
+		_noDoubleTapPT = ConfMan.getBool("no_doubletap_paneltoggle");
 }
 
 void WINCESdlGraphicsManager::internUpdateScreen() {
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h
index 89aba92..92894e0 100644
--- a/backends/graphics/wincesdl/wincesdl-graphics.h
+++ b/backends/graphics/wincesdl/wincesdl-graphics.h
@@ -117,6 +117,7 @@ public:
 
 	bool _panelInitialized; // only initialize the toolbar once
 	bool _noDoubleTapRMB;   // disable double tap -> rmb click
+	bool _noDoubleTapPT;    // disable double tap for toolbar toggling
 
 	CEGUI::ToolbarHandler _toolbarHandler;
 
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
index a4786d3..194f855 100644
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ b/backends/platform/wince/CEActionsPocket.cpp
@@ -137,6 +137,7 @@ void CEActionsPocket::initInstanceGame() {
 	bool is_tinsel = (gameid == "tinsel");
 	bool is_cruise = (gameid == "cruise");
 	bool is_made = (gameid == "made");
+	bool is_sci = (gameid == "sci");
 
 	GUI_Actions::initInstanceGame();
 
@@ -219,7 +220,7 @@ void CEActionsPocket::initInstanceGame() {
 	// Key bind method
 	_action_enabled[POCKET_ACTION_BINDKEYS] = true;
 	// Disable double-tap right-click for convenience
-	if (is_tinsel || is_cruise)
+	if (is_tinsel || is_cruise || is_sci)
 		if (!ConfMan.hasKey("no_doubletap_rightclick")) {
 			ConfMan.setBool("no_doubletap_rightclick", true);
 			ConfMan.flushToDisk();
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
index b12dada..c6456d3 100644
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ b/backends/platform/wince/CEActionsSmartphone.cpp
@@ -128,6 +128,7 @@ void CEActionsSmartphone::initInstanceGame() {
 	bool is_tinsel = (gameid == "tinsel");
 	bool is_cruise = (gameid == "cruise");
 	bool is_made = (gameid == "made");
+	bool is_sci = (gameid == "sci");
 
 	GUI_Actions::initInstanceGame();
 
@@ -185,7 +186,7 @@ void CEActionsSmartphone::initInstanceGame() {
 	// Bind keys
 	_action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true;
 	// Disable double-tap right-click for convenience
-	if (is_tinsel || is_cruise)
+	if (is_tinsel || is_cruise || is_sci)
 		if (!ConfMan.hasKey("no_doubletap_rightclick")) {
 			ConfMan.setBool("no_doubletap_rightclick", true);
 			ConfMan.flushToDisk();






More information about the Scummvm-git-logs mailing list