xinput1: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-06-27 21:48:47 +02:00
parent 55604f852b
commit 0115cba69d
7 changed files with 13 additions and 7 deletions

View File

@ -2,6 +2,8 @@ MODULE = xinput1_1.dll
PARENTSRC = ../xinput1_3 PARENTSRC = ../xinput1_3
DELAYIMPORTS = hid setupapi DELAYIMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
hid.c \ hid.c \
xinput_main.c xinput_main.c

View File

@ -2,6 +2,8 @@ MODULE = xinput1_2.dll
PARENTSRC = ../xinput1_3 PARENTSRC = ../xinput1_3
DELAYIMPORTS = hid setupapi DELAYIMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
hid.c \ hid.c \
xinput_main.c xinput_main.c

View File

@ -2,6 +2,8 @@ MODULE = xinput1_3.dll
IMPORTLIB = xinput IMPORTLIB = xinput
DELAYIMPORTS = hid setupapi DELAYIMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
hid.c \ hid.c \
xinput_main.c xinput_main.c

View File

@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include "wine/port.h"
#include <assert.h> #include <assert.h>
#include <stdarg.h> #include <stdarg.h>
@ -44,7 +42,6 @@
#include "xinput.h" #include "xinput.h"
#include "xinput_private.h" #include "xinput_private.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(xinput); 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->current_report = 0;
private->reports[0] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, private->report_length); private->reports[0] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, private->report_length);
private->reports[1] = 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); private->device_path = HeapAlloc(GetProcessHeap(), 0, size);
memcpy(private->device_path, path, size); memcpy(private->device_path, path, size);
private->enabled = TRUE; private->enabled = TRUE;
@ -238,13 +235,13 @@ void HID_find_gamepads(xinput_controller *devices)
&interface_data, data, sizeof(*data) + detail_size, NULL, NULL)) &interface_data, data, sizeof(*data) + detail_size, NULL, NULL))
continue; continue;
if (!strstrW(data->DevicePath, ig)) if (!wcsstr(data->DevicePath, ig))
continue; continue;
for (i = 0; i < XUSER_MAX_COUNT; i++) for (i = 0; i < XUSER_MAX_COUNT; i++)
{ {
struct hid_platform_private *private = devices[i].platform_private; 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; break;
} }
if (i != XUSER_MAX_COUNT) if (i != XUSER_MAX_COUNT)

View File

@ -17,7 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <assert.h> #include <assert.h>
#include <stdarg.h> #include <stdarg.h>
#include <string.h> #include <string.h>

View File

@ -2,6 +2,8 @@ MODULE = xinput1_4.dll
PARENTSRC = ../xinput1_3 PARENTSRC = ../xinput1_3
DELAYIMPORTS = hid setupapi DELAYIMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
hid.c \ hid.c \
xinput_main.c xinput_main.c

View File

@ -2,6 +2,8 @@ MODULE = xinput9_1_0.dll
PARENTSRC = ../xinput1_3 PARENTSRC = ../xinput1_3
DELAYIMPORTS = hid setupapi DELAYIMPORTS = hid setupapi
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
hid.c \ hid.c \
xinput_main.c xinput_main.c