[Scummvm-cvs-logs] CVS: scummvm/backends/wince/CEkeys EventsBuffer.cpp,1.1.2.1,1.1.2.2 EventsBuffer.h,1.1.2.1,1.1.2.2
Nicolas Bacca
arisme at users.sourceforge.net
Mon Jan 10 12:44:08 CET 2005
Update of /cvsroot/scummvm/scummvm/backends/wince/CEkeys
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18233/CEkeys
Modified Files:
Tag: branch-0-7-0
EventsBuffer.cpp EventsBuffer.h
Log Message:
Fix possible infinite loop when using a mapped key for the same action - fix FOTAQ sound (add FM_medium_quality option) - homogenous keyboard emulation
Index: EventsBuffer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEkeys/EventsBuffer.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
--- EventsBuffer.cpp 21 Dec 2004 00:28:14 -0000 1.1.2.1
+++ EventsBuffer.cpp 10 Jan 2005 20:43:17 -0000 1.1.2.2
@@ -24,7 +24,7 @@
namespace CEKEYS {
- bool EventsBuffer::simulateKey(Key *key) {
+ bool EventsBuffer::simulateKey(Key *key, bool pushed) {
SDL_Event ev = {0};
if (!key->keycode())
@@ -33,13 +33,11 @@
if (!key->ascii())
key->setAscii(key->keycode());
- ev.type = SDL_KEYDOWN;
+ ev.type = (pushed ? SDL_KEYDOWN : SDL_KEYUP);
ev.key.keysym.mod = (SDLMod)key->flags();
ev.key.keysym.sym = (SDLKey)key->keycode();
ev.key.keysym.unicode = key->keycode();
- if (SDL_PushEvent(&ev))
- return false;
- ev.type = SDL_KEYUP;
+ ev.key.keysym.mod = KMOD_RESERVED;
return (SDL_PushEvent(&ev) == 0);
}
Index: EventsBuffer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEkeys/EventsBuffer.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- EventsBuffer.h 21 Dec 2004 00:28:23 -0000 1.1.2.1
+++ EventsBuffer.h 10 Jan 2005 20:43:17 -0000 1.1.2.2
@@ -35,7 +35,7 @@
class EventsBuffer {
public:
- static bool simulateKey(Key *key);
+ static bool simulateKey(Key *key, bool pushed);
static bool simulateMouseMove(int x, int y);
static bool simulateMouseLeftClick(int x, int y, bool pushed);
static bool simulateMouseRightClick(int x, int y, bool pushed);
More information about the Scummvm-git-logs
mailing list