# HG changeset patch # User Patrice Mandin # Date 1138743215 0 # Node ID a201a8c62522dfabead9cbd5e475dda233731390 # Parent 0f00cbbe57928002a2da6ddf75103d51911a21ad Add flag to post mouse button events or not, and use defined function to post them diff -r 0f00cbbe5792 -r a201a8c62522 src/video/ataricommon/SDL_biosevents.c --- a/src/video/ataricommon/SDL_biosevents.c Tue Jan 31 19:46:26 2006 +0000 +++ b/src/video/ataricommon/SDL_biosevents.c Tue Jan 31 21:33:35 2006 +0000 @@ -153,7 +153,7 @@ TranslateKey(i, bios_currentascii[i], &keysym, SDL_FALSE)); } - SDL_AtariXbios_PostMouseEvents(this); + SDL_AtariXbios_PostMouseEvents(this, SDL_TRUE); /* Will be previous table */ memcpy(bios_previouskeyboard, bios_currentkeyboard, ATARIBIOS_MAXKEYS); diff -r 0f00cbbe5792 -r a201a8c62522 src/video/ataricommon/SDL_gemdosevents.c --- a/src/video/ataricommon/SDL_gemdosevents.c Tue Jan 31 19:46:26 2006 +0000 +++ b/src/video/ataricommon/SDL_gemdosevents.c Tue Jan 31 21:33:35 2006 +0000 @@ -158,7 +158,7 @@ TranslateKey(i, gemdos_currentascii[i], &keysym, SDL_FALSE)); } - SDL_AtariXbios_PostMouseEvents(this); + SDL_AtariXbios_PostMouseEvents(this, SDL_TRUE); /* Will be previous table */ memcpy(gemdos_previouskeyboard, gemdos_currentkeyboard, ATARIBIOS_MAXKEYS); diff -r 0f00cbbe5792 -r a201a8c62522 src/video/ataricommon/SDL_xbiosevents.c --- a/src/video/ataricommon/SDL_xbiosevents.c Tue Jan 31 19:46:26 2006 +0000 +++ b/src/video/ataricommon/SDL_xbiosevents.c Tue Jan 31 21:33:35 2006 +0000 @@ -122,7 +122,7 @@ } } -void SDL_AtariXbios_PostMouseEvents(_THIS) +void SDL_AtariXbios_PostMouseEvents(_THIS, SDL_bool buttonEvents) { if (SDL_AtariXbios_enabled==0) { return; @@ -135,7 +135,7 @@ } /* Mouse button ? */ - if (SDL_AtariXbios_mouseb != atari_prevmouseb) { + if (buttonEvents && (SDL_AtariXbios_mouseb != atari_prevmouseb)) { int i; for (i=0;i<2;i++) { diff -r 0f00cbbe5792 -r a201a8c62522 src/video/ataricommon/SDL_xbiosevents_c.h --- a/src/video/ataricommon/SDL_xbiosevents_c.h Tue Jan 31 19:46:26 2006 +0000 +++ b/src/video/ataricommon/SDL_xbiosevents_c.h Tue Jan 31 21:33:35 2006 +0000 @@ -46,6 +46,6 @@ extern void SDL_AtariXbios_InstallVectors(int vectors_mask); extern void SDL_AtariXbios_RestoreVectors(void); -extern void SDL_AtariXbios_PostMouseEvents(_THIS); +extern void SDL_AtariXbios_PostMouseEvents(_THIS, SDL_bool buttonEvents); #endif /* _SDL_XBIOSEVENTS_H_ */ diff -r 0f00cbbe5792 -r a201a8c62522 src/video/gem/SDL_gemevents.c --- a/src/video/gem/SDL_gemevents.c Tue Jan 31 19:46:26 2006 +0000 +++ b/src/video/gem/SDL_gemevents.c Tue Jan 31 21:33:35 2006 +0000 @@ -45,7 +45,7 @@ #include "SDL_gemevents_c.h" #include "SDL_atarikeys.h" /* for keyboard scancodes */ #include "SDL_atarievents_c.h" -#include "SDL_xbiosinterrupt_s.h" +#include "SDL_xbiosevents_c.h" /* Defines */ @@ -383,10 +383,7 @@ /* Mouse motion ? */ if (GEM_mouse_relative) { - if (SDL_AtariXbios_mousex || SDL_AtariXbios_mousey) { - SDL_PrivateMouseMotion(0, 1, SDL_AtariXbios_mousex, SDL_AtariXbios_mousey); - SDL_AtariXbios_mousex = SDL_AtariXbios_mousey = 0; - } + SDL_AtariXbios_PostMouseEvents(this, SDL_FALSE); } else { if ((prevmousex!=mx) || (prevmousey!=my)) { int posx, posy;