src/video/ataricommon/SDL_ikbdevents.c
changeset 331 e9278438fb3b
parent 297 f6ffac90895c
child 769 b8d311d90021
equal deleted inserted replaced
330:5fed858d551c 331:e9278438fb3b
   190 			int curbutton, prevbutton;
   190 			int curbutton, prevbutton;
   191 
   191 
   192 			curbutton = SDL_AtariIkbd_mouseb & (1<<i);
   192 			curbutton = SDL_AtariIkbd_mouseb & (1<<i);
   193 			prevbutton = atari_prevmouseb & (1<<i);
   193 			prevbutton = atari_prevmouseb & (1<<i);
   194 
   194 
   195 			if (curbutton & !prevbutton) {
   195 			if (curbutton && !prevbutton) {
   196 				SDL_PrivateMouseButton(SDL_PRESSED, atari_GetButton(i), 0, 0);
   196 				SDL_PrivateMouseButton(SDL_PRESSED, atari_GetButton(i), 0, 0);
   197 			}
   197 			}
   198 			if (!curbutton & prevbutton) {
   198 			if (!curbutton && prevbutton) {
   199 				SDL_PrivateMouseButton(SDL_RELEASED, atari_GetButton(i), 0, 0);
   199 				SDL_PrivateMouseButton(SDL_RELEASED, atari_GetButton(i), 0, 0);
   200 			}
   200 			}
   201 		}
   201 		}
   202 		atari_prevmouseb = SDL_AtariIkbd_mouseb;
   202 		atari_prevmouseb = SDL_AtariIkbd_mouseb;
   203 	}
   203 	}