Module: wine Branch: refs/heads/master Commit: 3083b0a6c7aed6d2ef2140d625f66fa1b75e6bef URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=3083b0a6c7aed6d2ef2140d6...
Author: Christoph Frick frick@sc-networks.de Date: Thu Jul 6 13:18:13 2006 +0200
dinput: Implement the GetProperty call for getting the range of an axis.
---
dlls/dinput/joystick_linuxinput.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index f365010..9304171 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -1443,13 +1443,14 @@ static HRESULT WINAPI JoystickAImpl_GetP }
case (DWORD) DIPROP_RANGE: { - /* LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph; */ - if ((pdiph->dwHow == DIPH_BYID) && - (pdiph->dwObj & DIDFT_ABSAXIS)) { - /* The app is querying the current range of the axis : return the lMin and lMax values */ - FIXME("unimplemented axis range query.\n"); + LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph; + int obj = find_property_offset(This, pdiph); + if (obj >= 0) { + pr->lMin = This->joydev->havemin[obj]; + pr->lMax = This->joydev->havemax[obj]; + TRACE("range(%ld, %ld) obj=%d\n", pr->lMin, pr->lMax, obj); + return DI_OK; } - break; }