Mercurial > sdl-ios-xcode
comparison src/video/wincommon/SDL_sysevents.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 | 13ee9f4834ea |
children | 29a638dc26db |
comparison
equal
deleted
inserted
replaced
60:e093bbc72ab9 | 61:994ed1d668e7 |
---|---|
319 state, button, x, y); | 319 state, button, x, y); |
320 } | 320 } |
321 } | 321 } |
322 return(0); | 322 return(0); |
323 | 323 |
324 | |
325 #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) | |
326 case WM_MOUSEWHEEL: | |
327 if ( SDL_VideoSurface && ! DINPUT_FULLSCREEN() ) { | |
328 Sint16 x, y; | |
329 Uint8 button = 0; | |
330 int move = (short)HIWORD(wParam); | |
331 if(move > 0) | |
332 button = 4; | |
333 else if(move < 0) | |
334 button = 5; | |
335 if(button) | |
336 { | |
337 if ( mouse_relative ) { | |
338 /* RJR: March 28, 2000 | |
339 report internal mouse position if in relative mode */ | |
340 x = 0; y = 0; | |
341 } else { | |
342 x = (Sint16)LOWORD(lParam); | |
343 y = (Sint16)HIWORD(lParam); | |
344 } | |
345 posted = SDL_PrivateMouseButton( | |
346 SDL_PRESSED, button, x, y); | |
347 } | |
348 } | |
349 return(0); | |
350 #endif | |
351 | |
324 #ifdef WM_GETMINMAXINFO | 352 #ifdef WM_GETMINMAXINFO |
325 /* This message is sent as a way for us to "check" the values | 353 /* This message is sent as a way for us to "check" the values |
326 * of a position change. If we don't like it, we can adjust | 354 * of a position change. If we don't like it, we can adjust |
327 * the values before they are changed. | 355 * the values before they are changed. |
328 */ | 356 */ |