comparison src/video/ataricommon/SDL_xbiosevents.c @ 1310:a201a8c62522

Add flag to post mouse button events or not, and use defined function to post them
author Patrice Mandin <patmandin@gmail.com>
date Tue, 31 Jan 2006 21:33:35 +0000
parents a8068adf156b
children c9b51268668f
comparison
equal deleted inserted replaced
1309:0f00cbbe5792 1310:a201a8c62522
120 return SDL_BUTTON_LEFT; 120 return SDL_BUTTON_LEFT;
121 break; 121 break;
122 } 122 }
123 } 123 }
124 124
125 void SDL_AtariXbios_PostMouseEvents(_THIS) 125 void SDL_AtariXbios_PostMouseEvents(_THIS, SDL_bool buttonEvents)
126 { 126 {
127 if (SDL_AtariXbios_enabled==0) { 127 if (SDL_AtariXbios_enabled==0) {
128 return; 128 return;
129 } 129 }
130 130
133 SDL_PrivateMouseMotion(0, 1, SDL_AtariXbios_mousex, SDL_AtariXbios_mousey); 133 SDL_PrivateMouseMotion(0, 1, SDL_AtariXbios_mousex, SDL_AtariXbios_mousey);
134 SDL_AtariXbios_mousex = SDL_AtariXbios_mousey = 0; 134 SDL_AtariXbios_mousex = SDL_AtariXbios_mousey = 0;
135 } 135 }
136 136
137 /* Mouse button ? */ 137 /* Mouse button ? */
138 if (SDL_AtariXbios_mouseb != atari_prevmouseb) { 138 if (buttonEvents && (SDL_AtariXbios_mouseb != atari_prevmouseb)) {
139 int i; 139 int i;
140 140
141 for (i=0;i<2;i++) { 141 for (i=0;i<2;i++) {
142 int curbutton, prevbutton; 142 int curbutton, prevbutton;
143 143