[dinput-9/9] implements the GetProperty call for getting the range of an axis

Christoph Frick frick at sc-networks.de
Thu Jul 6 06:18:13 CDT 2006


License: LGPL
ChangeLog:
2006-07-05  Christoph Frick <rid at zefix.tv>
	implements 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;
     }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060706/f0aecb52/attachment.pgp


More information about the wine-patches mailing list