Michael Stefaniuc : dinput: Avoid negating FAILED().
Alexandre Julliard
julliard at winehq.org
Wed Oct 20 15:58:39 CDT 2021
Module: wine
Branch: master
Commit: 1431608e6121cc437f265d8d606f2cd94e848a7a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=1431608e6121cc437f265d8d606f2cd94e848a7a
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Tue Oct 19 22:54:33 2021 +0200
dinput: Avoid negating FAILED().
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dinput/joystick_hid.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index 3dc43c450e4..24d00bf2c11 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -2619,7 +2619,7 @@ static HRESULT WINAPI hid_joystick_effect_Start( IDirectInputEffect *iface, DWOR
hr = DIERR_NOTEXCLUSIVEACQUIRED;
else if ((flags & DIES_NODOWNLOAD) && !impl->index)
hr = DIERR_NOTDOWNLOADED;
- else if ((flags & DIES_NODOWNLOAD) || !FAILED(hr = IDirectInputEffect_Download( iface )))
+ else if ((flags & DIES_NODOWNLOAD) || SUCCEEDED(hr = IDirectInputEffect_Download( iface )))
{
count = 1;
status = HidP_InitializeReportForID( HidP_Output, effect_control->id, preparsed,
@@ -2764,7 +2764,7 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface )
hr = DIERR_NOTEXCLUSIVEACQUIRED;
else if ((impl->flags & complete_mask) != complete_mask)
hr = DIERR_INCOMPLETEEFFECT;
- else if (!impl->index && !FAILED(hr = find_next_effect_id( impl->joystick, &impl->index )))
+ else if (!impl->index && SUCCEEDED(hr = find_next_effect_id( impl->joystick, &impl->index )))
{
if (!impl->type_specific_buf[0][0]) status = HIDP_STATUS_SUCCESS;
else status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX,
@@ -2929,7 +2929,7 @@ static HRESULT WINAPI hid_joystick_effect_Unload( IDirectInputEffect *iface )
EnterCriticalSection( &joystick->base.crit );
if (!impl->index)
hr = DI_NOEFFECT;
- else if (!FAILED(hr = IDirectInputEffect_Stop( iface )))
+ else if (SUCCEEDED(hr = IDirectInputEffect_Stop( iface )))
{
impl->joystick->effect_inuse[impl->index - 1] = FALSE;
impl->index = 0;
More information about the wine-cvs
mailing list