Mercurial > sdl-ios-xcode
diff src/video/win32/SDL_win32mouse.c @ 2940:b93965a16fe0
Fixed X11 mouse motion/button events - it's not actually safe to cast mouse events to device events.
Fixed building SDL without XInput support
Simplified the process of registering a mouse device
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 01 Jan 2009 07:59:08 +0000 |
parents | 99210400e8b9 |
children | d2f68ec8c1d0 |
line wrap: on
line diff
--- a/src/video/win32/SDL_win32mouse.c Thu Jan 01 07:58:20 2009 +0000 +++ b/src/video/win32/SDL_win32mouse.c Thu Jan 01 07:59:08 2009 +0000 @@ -150,7 +150,7 @@ /* we're saving the handle to the device */ mice[index] = deviceList[i].hDevice; SDL_zero(mouse); - SDL_SetMouseIndexId(index, index); + mouse.id = index; l = SDL_strlen(device_name); /* we're checking if the device isn't by any chance a tablet */ @@ -176,10 +176,10 @@ data->WTInfoA(WTI_DEVICES, DVC_NPRESSURE, &pressure); data->WTInfoA(WTI_DEVICES, DVC_NCSRTYPES, &cursors); data->mouse = - SDL_AddMouse(&mouse, index, device_name, pressure.axMax, + SDL_AddMouse(&mouse, device_name, pressure.axMax, pressure.axMin, cursors); } else { - data->mouse = SDL_AddMouse(&mouse, index, device_name, 0, 0, 1); + data->mouse = SDL_AddMouse(&mouse, device_name, 0, 0, 1); } ++index; SDL_free(buffer);