comparison src/video/windx5/SDL_dx5events.c @ 61:994ed1d668e7

Mouse wheel sends mouse button (4/5) events on Windows
author Sam Lantinga <slouken@lokigames.com>
date Sat, 16 Jun 2001 01:01:42 +0000
parents 74212992fb08
children 29a638dc26db
comparison
equal deleted inserted replaced
60:e093bbc72ab9 61:994ed1d668e7
376 case DIMOFS_X: 376 case DIMOFS_X:
377 xrel += (Sint16)ptrbuf[i].dwData; 377 xrel += (Sint16)ptrbuf[i].dwData;
378 break; 378 break;
379 case DIMOFS_Y: 379 case DIMOFS_Y:
380 yrel += (Sint16)ptrbuf[i].dwData; 380 yrel += (Sint16)ptrbuf[i].dwData;
381 break;
382 case DIMOFS_Z:
383 if ( xrel || yrel ) {
384 posted = SDL_PrivateMouseMotion(
385 0, 1, xrel, yrel);
386 xrel = 0;
387 yrel = 0;
388 }
389 if((int)ptrbuf[i].dwData > 0)
390 posted = SDL_PrivateMouseButton(
391 SDL_PRESSED, 4, 0, 0);
392 else if((int)ptrbuf[i].dwData < 0)
393 posted = SDL_PrivateMouseButton(
394 SDL_PRESSED, 5, 0, 0);
381 break; 395 break;
382 case DIMOFS_BUTTON0: 396 case DIMOFS_BUTTON0:
383 case DIMOFS_BUTTON1: 397 case DIMOFS_BUTTON1:
384 case DIMOFS_BUTTON2: 398 case DIMOFS_BUTTON2:
385 case DIMOFS_BUTTON3: 399 case DIMOFS_BUTTON3: