[Scummvm-cvs-logs] CVS: scummvm/backends/wince CEActionsPocket.cpp,1.2.2.1,1.2.2.2 CEActionsSmartphone.cpp,1.1.2.1,1.1.2.2 wince-sdl.cpp,1.18.2.1,1.18.2.2 wince-sdl.h,1.12.2.1,1.12.2.2

Nicolas Bacca arisme at users.sourceforge.net
Mon Dec 20 16:29:04 CET 2004


Update of /cvsroot/scummvm/scummvm/backends/wince
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7491

Modified Files:
      Tag: branch-0-7-0
	CEActionsPocket.cpp CEActionsSmartphone.cpp wince-sdl.cpp 
	wince-sdl.h 
Log Message:
Cleanup mouseclick emulation (and make the new about dialog happy)

Index: CEActionsPocket.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEActionsPocket.cpp,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -d -r1.2.2.1 -r1.2.2.2
--- CEActionsPocket.cpp	20 Dec 2004 23:29:09 -0000	1.2.2.1
+++ CEActionsPocket.cpp	21 Dec 2004 00:28:10 -0000	1.2.2.2
@@ -160,8 +160,14 @@
 }
 
 bool CEActionsPocket::perform(ActionType action, bool pushed) {
-	if (!pushed)
+	if (!pushed) {
+		switch(action) {
+			case POCKET_ACTION_RIGHTCLICK:
+				_mainSystem->add_right_click(false);
+				return true;
+		}
 		return false;
+	}
 
 	switch (action) {
 		case POCKET_ACTION_PAUSE:
@@ -179,7 +185,7 @@
 			_mainSystem->swap_sound_master();
 			return true;
 		case POCKET_ACTION_RIGHTCLICK:
-			_mainSystem->add_right_click();
+			_mainSystem->add_right_click(true);
 			return true;
 		case POCKET_ACTION_CURSOR:
 			_mainSystem->swap_mouse_visibility();

Index: CEActionsSmartphone.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEActionsSmartphone.cpp,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- CEActionsSmartphone.cpp	20 Dec 2004 23:29:09 -0000	1.1.2.1
+++ CEActionsSmartphone.cpp	21 Dec 2004 00:28:11 -0000	1.1.2.2
@@ -146,6 +146,14 @@
 
 bool CEActionsSmartphone::perform(ActionType action, bool pushed) {
 	if (!pushed) {
+		switch (action) {
+			case SMARTPHONE_ACTION_RIGHTCLICK:
+				_mainSystem->add_right_click(false);
+				return true;
+			case SMARTPHONE_ACTION_LEFTCLICK:
+				_mainSystem->add_left_click(false);
+				return true;
+		}
 		return false;
 	}
 
@@ -155,10 +163,10 @@
 			EventsBuffer::simulateKey(&_key_action[action]);
 			return true;
 		case SMARTPHONE_ACTION_RIGHTCLICK:
-			_mainSystem->add_right_click();
+			_mainSystem->add_right_click(true);
 			return true;
 		case SMARTPHONE_ACTION_LEFTCLICK:
-			_mainSystem->add_left_click();
+			_mainSystem->add_left_click(true);
 			return true;
 		case SMARTPHONE_ACTION_UP:
 			_mainSystem->move_cursor_up();

Index: wince-sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/wince-sdl.cpp,v
retrieving revision 1.18.2.1
retrieving revision 1.18.2.2
diff -u -d -r1.18.2.1 -r1.18.2.2
--- wince-sdl.cpp	20 Dec 2004 23:31:27 -0000	1.18.2.1
+++ wince-sdl.cpp	21 Dec 2004 00:28:11 -0000	1.18.2.2
@@ -259,10 +259,10 @@
 		_toolbarHandler.forceRedraw(); // redraw sound icon
 }
 
-void OSystem_WINCE3::add_right_click() {
+void OSystem_WINCE3::add_right_click(bool pushed) {
 	int x, y;
 	retrieve_mouse_location(x, y);
-	EventsBuffer::simulateMouseRightClick(x, y);
+	EventsBuffer::simulateMouseRightClick(x, y, pushed);
 }
 
 void OSystem_WINCE3::swap_mouse_visibility() {
@@ -361,10 +361,10 @@
 	ConfMan.flushToDisk();
 }
 
-void OSystem_WINCE3::add_left_click() {
+void OSystem_WINCE3::add_left_click(bool pushed) {
 	int x, y;
 	retrieve_mouse_location(x, y);
-	EventsBuffer::simulateMouseLeftClick(x, y);
+	EventsBuffer::simulateMouseLeftClick(x, y, pushed);
 }
 
 void OSystem_WINCE3::move_cursor_up() {

Index: wince-sdl.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/wince-sdl.h,v
retrieving revision 1.12.2.1
retrieving revision 1.12.2.2
diff -u -d -r1.12.2.1 -r1.12.2.2
--- wince-sdl.h	20 Dec 2004 23:31:27 -0000	1.12.2.1
+++ wince-sdl.h	21 Dec 2004 00:28:12 -0000	1.12.2.2
@@ -64,7 +64,7 @@
 	void swap_panel_visibility();
 	void swap_panel();
 	void swap_sound_master();
-	void add_right_click();
+	void add_right_click(bool pushed);
 	void swap_mouse_visibility();
 	void swap_freeLook();
 	void swap_zoom_up();
@@ -74,7 +74,7 @@
 	// Smartphone actions
 	void loadSmartphoneConfigurationElement(String element, int &value, int defaultValue);
 	void loadSmartphoneConfiguration();
-	void add_left_click();
+	void add_left_click(bool pushed);
 	void move_cursor_up();
 	void move_cursor_down();
 	void move_cursor_left();





More information about the Scummvm-git-logs mailing list