[Scummvm-cvs-logs] CVS: scummvm/backends/wince/CEkeys EventsBuffer.cpp,1.1,1.1.2.1 EventsBuffer.h,1.1,1.1.2.1
Nicolas Bacca
arisme at users.sourceforge.net
Mon Dec 20 16:29:00 CET 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.h,1.37,1.38 smush_player.cpp,1.138,1.139
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/backends/wince/CEkeys
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7491/CEkeys
Modified Files:
Tag: branch-0-7-0
EventsBuffer.cpp EventsBuffer.h
Log Message:
Cleanup mouseclick emulation (and make the new about dialog happy)
Index: EventsBuffer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEkeys/EventsBuffer.cpp,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- EventsBuffer.cpp 9 May 2004 14:34:47 -0000 1.1
+++ EventsBuffer.cpp 21 Dec 2004 00:28:14 -0000 1.1.2.1
@@ -52,29 +52,23 @@
return (SDL_PushEvent(&ev) == 0);
}
- bool EventsBuffer::simulateMouseLeftClick(int x, int y) {
+ bool EventsBuffer::simulateMouseLeftClick(int x, int y, bool pushed) {
SDL_Event ev = {0};
- ev.type = SDL_MOUSEBUTTONDOWN;
+ ev.type = (pushed ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP);
ev.button.button = SDL_BUTTON_LEFT;
ev.button.x = x;
ev.button.y = y;
- if (SDL_PushEvent(&ev))
- return false;
- ev.type = SDL_MOUSEBUTTONUP;
return (SDL_PushEvent(&ev) == 0);
}
- bool EventsBuffer::simulateMouseRightClick(int x, int y) {
+ bool EventsBuffer::simulateMouseRightClick(int x, int y, bool pushed) {
SDL_Event ev = {0};
- ev.type = SDL_MOUSEBUTTONDOWN;
+ ev.type = (pushed ? SDL_MOUSEBUTTONDOWN : SDL_MOUSEBUTTONUP);
ev.button.button = SDL_BUTTON_RIGHT;
ev.button.x = x;
ev.button.y = y;
- if (SDL_PushEvent(&ev))
- return false;
- ev.type = SDL_MOUSEBUTTONUP;
return (SDL_PushEvent(&ev) == 0);
}
}
Index: EventsBuffer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEkeys/EventsBuffer.h,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- EventsBuffer.h 9 May 2004 14:34:47 -0000 1.1
+++ EventsBuffer.h 21 Dec 2004 00:28:23 -0000 1.1.2.1
@@ -37,8 +37,8 @@
public:
static bool simulateKey(Key *key);
static bool simulateMouseMove(int x, int y);
- static bool simulateMouseLeftClick(int x, int y);
- static bool simulateMouseRightClick(int x, int y);
+ static bool simulateMouseLeftClick(int x, int y, bool pushed);
+ static bool simulateMouseRightClick(int x, int y, bool pushed);
};
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.h,1.37,1.38 smush_player.cpp,1.138,1.139
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list