Rémi Bernon : windows.gaming.input: Use case insensitive compare when looking for devices.

Alexandre Julliard julliard at winehq.org
Wed May 11 16:10:25 CDT 2022


Module: wine
Branch: master
Commit: 5912d0fa00cf55f0f7977dc12839492b5f6389bb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5912d0fa00cf55f0f7977dc12839492b5f6389bb

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Fri May  6 10:49:18 2022 +0200

windows.gaming.input: Use case insensitive compare when looking for devices.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/windows.gaming.input/provider.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/windows.gaming.input/provider.c b/dlls/windows.gaming.input/provider.c
index 70900000eef..1f3f4e047f5 100644
--- a/dlls/windows.gaming.input/provider.c
+++ b/dlls/windows.gaming.input/provider.c
@@ -572,7 +572,7 @@ void provider_create( const WCHAR *device_path )
 
     EnterCriticalSection( &provider_cs );
     LIST_FOR_EACH_ENTRY( entry, &provider_list, struct provider, entry )
-        if ((found = !wcscmp( entry->device_path, device_path ))) break;
+        if ((found = !wcsicmp( entry->device_path, device_path ))) break;
     if (!found) list_add_tail( &provider_list, &impl->entry );
     LeaveCriticalSection( &provider_cs );
 
@@ -592,11 +592,12 @@ void provider_remove( const WCHAR *device_path )
 
     EnterCriticalSection( &provider_cs );
     LIST_FOR_EACH_ENTRY( entry, &provider_list, struct provider, entry )
-        if ((found = !wcscmp( entry->device_path, device_path ))) break;
+        if ((found = !wcsicmp( entry->device_path, device_path ))) break;
     if (found) list_remove( &entry->entry );
     LeaveCriticalSection( &provider_cs );
 
-    if (found)
+    if (!found) WARN( "provider not found for device %s\n", debugstr_w( device_path ) );
+    else
     {
         provider = &entry->IGameControllerProvider_iface;
         manager_on_provider_removed( provider );




More information about the wine-cvs mailing list