From 0115cba69d245c5841c762cf02652a00980143a6 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 27 Jun 2019 21:48:47 +0200 Subject: [PATCH] xinput1: Build with msvcrt. Signed-off-by: Alexandre Julliard --- dlls/xinput1_1/Makefile.in | 2 ++ dlls/xinput1_2/Makefile.in | 2 ++ dlls/xinput1_3/Makefile.in | 2 ++ dlls/xinput1_3/hid.c | 9 +++------ dlls/xinput1_3/xinput_main.c | 1 - dlls/xinput1_4/Makefile.in | 2 ++ dlls/xinput9_1_0/Makefile.in | 2 ++ 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/dlls/xinput1_1/Makefile.in b/dlls/xinput1_1/Makefile.in index d1c425872e1..a2b17a248cd 100644 --- a/dlls/xinput1_1/Makefile.in +++ b/dlls/xinput1_1/Makefile.in @@ -2,6 +2,8 @@ MODULE = xinput1_1.dll PARENTSRC = ../xinput1_3 DELAYIMPORTS = hid setupapi +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ hid.c \ xinput_main.c diff --git a/dlls/xinput1_2/Makefile.in b/dlls/xinput1_2/Makefile.in index 822ec157ac8..fd38c6f6cc5 100644 --- a/dlls/xinput1_2/Makefile.in +++ b/dlls/xinput1_2/Makefile.in @@ -2,6 +2,8 @@ MODULE = xinput1_2.dll PARENTSRC = ../xinput1_3 DELAYIMPORTS = hid setupapi +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ hid.c \ xinput_main.c diff --git a/dlls/xinput1_3/Makefile.in b/dlls/xinput1_3/Makefile.in index 9c873f93889..3b4968fb6d8 100644 --- a/dlls/xinput1_3/Makefile.in +++ b/dlls/xinput1_3/Makefile.in @@ -2,6 +2,8 @@ MODULE = xinput1_3.dll IMPORTLIB = xinput DELAYIMPORTS = hid setupapi +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ hid.c \ xinput_main.c diff --git a/dlls/xinput1_3/hid.c b/dlls/xinput1_3/hid.c index dc5601cb6a1..aa46f352397 100644 --- a/dlls/xinput1_3/hid.c +++ b/dlls/xinput1_3/hid.c @@ -17,8 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include #include @@ -44,7 +42,6 @@ #include "xinput.h" #include "xinput_private.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(xinput); @@ -190,7 +187,7 @@ static void build_private(struct hid_platform_private *private, PHIDP_PREPARSED_ private->current_report = 0; private->reports[0] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, private->report_length); private->reports[1] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, private->report_length); - size = (strlenW(path) + 1) * sizeof(WCHAR); + size = (lstrlenW(path) + 1) * sizeof(WCHAR); private->device_path = HeapAlloc(GetProcessHeap(), 0, size); memcpy(private->device_path, path, size); private->enabled = TRUE; @@ -238,13 +235,13 @@ void HID_find_gamepads(xinput_controller *devices) &interface_data, data, sizeof(*data) + detail_size, NULL, NULL)) continue; - if (!strstrW(data->DevicePath, ig)) + if (!wcsstr(data->DevicePath, ig)) continue; for (i = 0; i < XUSER_MAX_COUNT; i++) { struct hid_platform_private *private = devices[i].platform_private; - if (devices[i].connected && !strcmpW(data->DevicePath, private->device_path)) + if (devices[i].connected && !wcscmp(data->DevicePath, private->device_path)) break; } if (i != XUSER_MAX_COUNT) diff --git a/dlls/xinput1_3/xinput_main.c b/dlls/xinput1_3/xinput_main.c index c412887ad7a..57337e09ad9 100644 --- a/dlls/xinput1_3/xinput_main.c +++ b/dlls/xinput1_3/xinput_main.c @@ -17,7 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include #include #include diff --git a/dlls/xinput1_4/Makefile.in b/dlls/xinput1_4/Makefile.in index 7acb9dc061b..cdf4b4fed05 100644 --- a/dlls/xinput1_4/Makefile.in +++ b/dlls/xinput1_4/Makefile.in @@ -2,6 +2,8 @@ MODULE = xinput1_4.dll PARENTSRC = ../xinput1_3 DELAYIMPORTS = hid setupapi +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ hid.c \ xinput_main.c diff --git a/dlls/xinput9_1_0/Makefile.in b/dlls/xinput9_1_0/Makefile.in index c07022a70ba..dc8739c4640 100644 --- a/dlls/xinput9_1_0/Makefile.in +++ b/dlls/xinput9_1_0/Makefile.in @@ -2,6 +2,8 @@ MODULE = xinput9_1_0.dll PARENTSRC = ../xinput1_3 DELAYIMPORTS = hid setupapi +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ hid.c \ xinput_main.c