[Bug 4952] New: joystick with POV and JoystickAImpl_SetProperty-proprange

Wine Bugs wine-bugs at winehq.org
Tue Mar 28 14:33:38 CST 2006


           Summary: joystick with POV and JoystickAImpl_SetProperty-
           Product: Wine
           Version: 0.9.10.
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: wine-directx-dinput
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: semerad at sisal.ms.mff.cuni.cz

There is a bug in dlls/dinput/joystick_linux.c . POV doesn't work, when
application calls JoystickAImpl_SetProperty-proprange on POV. Function
calculate_pov doesn't expect that lMin and lMax can be changed. I know it is
strange to set proprange on POV, but at least Il-2 Sturmovik demo 2.0 is doing it.

I have solved it with following small patch, which ignores set proprange on POV
(it was easier than change constants in calculate_pov :-), but than get
proprange will not return previously set values if there would be application
which will call it.

Pavel Semerad

--- ./dlls/dinput/joystick_linux.c.pov  2006-03-15 15:50:31.000000000 +0100
+++ ./dlls/dinput/joystick_linux.c      2006-03-28 16:06:01.000000000 +0200
             if (ph->dwHow == DIPH_DEVICE) {
                 TRACE("proprange(%ld,%ld) all\n",pr->lMin,pr->lMax);
                 for (i = 0; i < This->user_df->dwNumObjs; i++) {
+                    if (i >= 8 && i <= 11)  continue;
                     This->props[i].lMin = pr->lMin;
                     This->props[i].lMax = pr->lMax;
@@ -1156,6 +1157,7 @@ static HRESULT WINAPI JoystickAImpl_SetP
                 int obj = find_property(This, ph);
                 TRACE("proprange(%ld,%ld) obj=%d\n",pr->lMin,pr->lMax,obj);
                 if (obj >= 0) {
+                    if (obj >= 8 && obj <= 11)  return DI_OK;
                     This->props[obj].lMin = pr->lMin;
                     This->props[obj].lMax = pr->lMax;
                     return DI_OK;

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the wine-bugs mailing list