comparison src/video/wincommon/SDL_sysevents.c @ 162:0a26c92c2385

Fixed mouse wheel motion position on Windows
author Sam Lantinga <slouken@libsdl.org>
date Fri, 31 Aug 2001 21:21:24 +0000
parents 0e66fd980014
children ec9ec33673a2
comparison
equal deleted inserted replaced
161:eb6b76a95f2d 162:0a26c92c2385
333 333
334 #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) 334 #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
335 case WM_MOUSEWHEEL: 335 case WM_MOUSEWHEEL:
336 if ( SDL_VideoSurface && ! DINPUT_FULLSCREEN() ) { 336 if ( SDL_VideoSurface && ! DINPUT_FULLSCREEN() ) {
337 Sint16 x, y; 337 Sint16 x, y;
338 Uint8 button = 0;
339 int move = (short)HIWORD(wParam); 338 int move = (short)HIWORD(wParam);
340 if(move > 0) 339 if ( move ) {
341 button = 4; 340 Uint8 button;
342 else if(move < 0) 341 if ( move > 0 )
343 button = 5; 342 button = 4;
344 if(button) 343 else
345 { 344 button = 5;
346 if ( mouse_relative ) {
347 /* RJR: March 28, 2000
348 report internal mouse position if in relative mode */
349 x = 0; y = 0;
350 } else {
351 x = (Sint16)LOWORD(lParam);
352 y = (Sint16)HIWORD(lParam);
353 }
354 posted = SDL_PrivateMouseButton( 345 posted = SDL_PrivateMouseButton(
355 SDL_PRESSED, button, x, y); 346 SDL_PRESSED, button, 0, 0);
356 } 347 }
357 } 348 }
358 return(0); 349 return(0);
359 #endif 350 #endif
360 351