DI_PROPNOEFFECT after dinput property change is not an error

This commit is contained in:
Michaël Banaan Ananas 2011-08-01 23:06:12 +00:00
parent bbb7051d8d
commit ec0f083375

View File

@ -1426,7 +1426,7 @@ static BOOL CALLBACK dinput_mouse_enum(LPCDIDEVICEINSTANCE instance, LPVOID ref)
// set relative mode on the mouse device
result = dinput_set_dword_property(devinfo->dinput.device, DIPROP_AXISMODE, 0, DIPH_DEVICE, DIPROPAXISMODE_REL);
if (result != DI_OK)
if (result != DI_OK && result != DI_PROPNOEFFECT)
{
mame_printf_error("DirectInput: Unable to set relative mode for mouse %d (%s)\n", generic_device_index(mouse_list, devinfo), devinfo->name);
goto error;
@ -1523,17 +1523,17 @@ static BOOL CALLBACK dinput_joystick_enum(LPCDIDEVICEINSTANCE instance, LPVOID r
// set absolute mode
result = dinput_set_dword_property(devinfo->dinput.device, DIPROP_AXISMODE, 0, DIPH_DEVICE, DIPROPAXISMODE_ABS);
if (result != DI_OK)
if (result != DI_OK && result != DI_PROPNOEFFECT)
mame_printf_warning("DirectInput: Unable to set absolute mode for joystick %d (%s)\n", generic_device_index(joystick_list, devinfo), devinfo->name);
// turn off deadzone; we do our own calculations
result = dinput_set_dword_property(devinfo->dinput.device, DIPROP_DEADZONE, 0, DIPH_DEVICE, 0);
if (result != DI_OK)
if (result != DI_OK && result != DI_PROPNOEFFECT)
mame_printf_warning("DirectInput: Unable to reset deadzone for joystick %d (%s)\n", generic_device_index(joystick_list, devinfo), devinfo->name);
// turn off saturation; we do our own calculations
result = dinput_set_dword_property(devinfo->dinput.device, DIPROP_SATURATION, 0, DIPH_DEVICE, 10000);
if (result != DI_OK)
if (result != DI_OK && result != DI_PROPNOEFFECT)
mame_printf_warning("DirectInput: Unable to reset saturation for joystick %d (%s)\n", generic_device_index(joystick_list, devinfo), devinfo->name);
// cap the number of axes, POVs, and buttons based on the format