From 622c66b16bed182d544f4a2a8456e0f0ccb9d453 Mon Sep 17 00:00:00 2001
From: Andrew Fenn <andre...@gmail.com>
Date: Fri, 31 Oct 2008 17:49:27 +0000
Subject: xinput: Initial implementation of xinput xbox 360 joystick library
---
dlls/xinput1_1/Makefile.in | 12 ++++++++++
dlls/xinput1_1/version.rc | 27 ++++++++++++++++++++++
dlls/xinput1_1/xinput1_1.spec | 5 ++++
dlls/xinput1_2/Makefile.in | 12 ++++++++++
dlls/xinput1_2/version.rc | 27 ++++++++++++++++++++++
dlls/xinput1_2/xinput1_2.spec | 5 ++++
dlls/xinput1_3/Makefile.in | 16 +++++++++++++
dlls/xinput1_3/version.rc | 27 ++++++++++++++++++++++
dlls/xinput1_3/xinput1_3.spec | 7 +++++
dlls/xinput1_3/xinput1_3_main.c | 45 +++++++++++++++++++++++++++++++++++++
dlls/xinput9_1_0/Makefile.in | 12 ++++++++++
dlls/xinput9_1_0/version.rc | 27 ++++++++++++++++++++++
dlls/xinput9_1_0/xinput9_1_0.spec | 4 +++
13 files changed, 226 insertions(+), 0 deletions(-)
create mode 100644 dlls/xinput1_1/Makefile.in
create mode 100644 dlls/xinput1_1/version.rc
create mode 100644 dlls/xinput1_1/xinput1_1.spec
create mode 100644 dlls/xinput1_2/Makefile.in
create mode 100644 dlls/xinput1_2/version.rc
create mode 100644 dlls/xinput1_2/xinput1_2.spec
create mode 100644 dlls/xinput1_3/Makefile.in
create mode 100644 dlls/xinput1_3/version.rc
create mode 100644 dlls/xinput1_3/xinput1_3.spec
create mode 100644 dlls/xinput1_3/xinput1_3_main.c
create mode 100644 dlls/xinput9_1_0/Makefile.in
create mode 100644 dlls/xinput9_1_0/version.rc
create mode 100644 dlls/xinput9_1_0/xinput9_1_0.spec
diff --git a/dlls/xinput1_1/Makefile.in b/dlls/xinput1_1/Makefile.in
new file mode 100644
index 0000000..16e6153
--- /dev/null
+++ b/dlls/xinput1_1/Makefile.in
@@ -0,0 +1,12 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+MODULE = xinput1_1.dll
+IMPORTS = kernel32
+
+RC_SRCS = version.rc
+
+@MAKE_DLL_RULES@
+
+@DEPENDENCIES@ # everything below this line is overwritten by make depend
diff --git a/dlls/xinput1_1/version.rc b/dlls/xinput1_1/version.rc
new file mode 100644
index 0000000..e93aa90
--- /dev/null
+++ b/dlls/xinput1_1/version.rc
@@ -0,0 +1,27 @@
+/*
+ * The Wine project - Xinput Joystick Library
+ * Copyright 2008 Andrew Fenn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define WINE_FILEDESCRIPTION_STR "Wine Common Controller API"
+#define WINE_FILENAME_STR "xinput1_1.dll"
+#define WINE_FILEVERSION 9,12,589,0000
+#define WINE_FILEVERSION_STR "9.12.589.0000"
+#define WINE_PRODUCTVERSION 9,12,589,0000
+#define WINE_PRODUCTVERSION_STR "9.12"
+
+#include "wine/wine_common_ver.rc"
diff --git a/dlls/xinput1_1/xinput1_1.spec b/dlls/xinput1_1/xinput1_1.spec
new file mode 100644
index 0000000..95759c3
--- /dev/null
+++ b/dlls/xinput1_1/xinput1_1.spec
@@ -0,0 +1,5 @@
+@ stdcall XInputEnable(long) xinput1_3.XInputEnable
+@ stdcall XInputGetCapabilities(long long ptr) xinput1_3.XInputGetCapabilities
+@ stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr) xinput1_3.XInputGetDSoundAudioDeviceGuids
+@ stdcall XInputSetState(long ptr) xinput1_3.XInputSetState
+@ stdcall XInputGetState(long ptr) xinput1_3.XInputGetState
diff --git a/dlls/xinput1_2/Makefile.in b/dlls/xinput1_2/Makefile.in
new file mode 100644
index 0000000..c1e33ef
--- /dev/null
+++ b/dlls/xinput1_2/Makefile.in
@@ -0,0 +1,12 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+MODULE = xinput1_2.dll
+IMPORTS = kernel32
+
+RC_SRCS = version.rc
+
+@MAKE_DLL_RULES@
+
+@DEPENDENCIES@ # everything below this line is overwritten by make depend
diff --git a/dlls/xinput1_2/version.rc b/dlls/xinput1_2/version.rc
new file mode 100644
index 0000000..5dec834
--- /dev/null
+++ b/dlls/xinput1_2/version.rc
@@ -0,0 +1,27 @@
+/*
+ * The Wine project - Xinput Joystick Library
+ * Copyright 2008 Andrew Fenn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define WINE_FILEDESCRIPTION_STR "Wine Common Controller API"
+#define WINE_FILENAME_STR "xinput1_2.dll"
+#define WINE_FILEVERSION 9,14,701,0000
+#define WINE_FILEVERSION_STR "9.14.701.0000"
+#define WINE_PRODUCTVERSION 9,14,701,0000
+#define WINE_PRODUCTVERSION_STR "9.14"
+
+#include "wine/wine_common_ver.rc"
diff --git a/dlls/xinput1_2/xinput1_2.spec b/dlls/xinput1_2/xinput1_2.spec
new file mode 100644
index 0000000..95759c3
--- /dev/null
+++ b/dlls/xinput1_2/xinput1_2.spec
@@ -0,0 +1,5 @@
+@ stdcall XInputEnable(long) xinput1_3.XInputEnable
+@ stdcall XInputGetCapabilities(long long ptr) xinput1_3.XInputGetCapabilities
+@ stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr) xinput1_3.XInputGetDSoundAudioDeviceGuids
+@ stdcall XInputSetState(long ptr) xinput1_3.XInputSetState
+@ stdcall XInputGetState(long ptr) xinput1_3.XInputGetState
diff --git a/dlls/xinput1_3/Makefile.in b/dlls/xinput1_3/Makefile.in
new file mode 100644
index 0000000..3587ac4
--- /dev/null
+++ b/dlls/xinput1_3/Makefile.in
@@ -0,0 +1,16 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+MODULE = xinput1_3.dll
+IMPORTLIB = xinput1_3
+IMPORTS = kernel32
+
+C_SRCS = \
+ xinput1_3_main.c
+
+RC_SRCS = version.rc
+
+@MAKE_DLL_RULES@
+
+@DEPENDENCIES@ # everything below this line is overwritten by make depend
diff --git a/dlls/xinput1_3/version.rc b/dlls/xinput1_3/version.rc
new file mode 100644
index 0000000..191b142
--- /dev/null
+++ b/dlls/xinput1_3/version.rc
@@ -0,0 +1,27 @@
+/*
+ * The Wine project - Xinput Joystick Library
+ * Copyright 2008 Andrew Fenn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define WINE_FILEDESCRIPTION_STR "Wine Common Controller API"
+#define WINE_FILENAME_STR "xinput1_3.dll"
+#define WINE_FILEVERSION 9,15,779,0000
+#define WINE_FILEVERSION_STR "9.15.779.0000"
+#define WINE_PRODUCTVERSION 9,15,779,0000
+#define WINE_PRODUCTVERSION_STR "9.15"
+
+#include "wine/wine_common_ver.rc"
diff --git a/dlls/xinput1_3/xinput1_3.spec b/dlls/xinput1_3/xinput1_3.spec
new file mode 100644
index 0000000..5caaa37
--- /dev/null
+++ b/dlls/xinput1_3/xinput1_3.spec
@@ -0,0 +1,7 @@
+@ stub XInputEnable #(long)
+@ stub XInputSetState #(long ptr)
+@ stub XInputGetState #(long ptr)
+@ stub XInputGetKeystroke #(long long ptr)
+@ stub XInputGetCapabilities #(long long ptr)
+@ stub XInputGetDSoundAudioDeviceGuids #(long ptr ptr)
+@ stub XInputGetBatteryInformation
diff --git a/dlls/xinput1_3/xinput1_3_main.c b/dlls/xinput1_3/xinput1_3_main.c
new file mode 100644
index 0000000..6198b3b
--- /dev/null
+++ b/dlls/xinput1_3/xinput1_3_main.c
@@ -0,0 +1,45 @@
+/*
+ * The Wine project - Xinput Joystick Library
+ * Copyright 2008 Andrew Fenn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include <assert.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include "wine/debug.h"
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(xinput);
+
+BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
+{
+ switch(reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(inst);
+ break;
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ return TRUE;
+}
diff --git a/dlls/xinput9_1_0/Makefile.in b/dlls/xinput9_1_0/Makefile.in
new file mode 100644
index 0000000..6712304
--- /dev/null
+++ b/dlls/xinput9_1_0/Makefile.in
@@ -0,0 +1,12 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+MODULE = xinput9_1_0.dll
+IMPORTS = kernel32
+
+RC_SRCS = version.rc
+
+@MAKE_DLL_RULES@
+
+@DEPENDENCIES@ # everything below this line is overwritten by make depend
diff --git a/dlls/xinput9_1_0/version.rc b/dlls/xinput9_1_0/version.rc
new file mode 100644
index 0000000..9e4d13e
--- /dev/null
+++ b/dlls/xinput9_1_0/version.rc
@@ -0,0 +1,27 @@
+/*
+ * The Wine project - Xinput Joystick Library
+ * Copyright 2008 Andrew Fenn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define WINE_FILEDESCRIPTION_STR "Wine Common Controller API"
+#define WINE_FILENAME_STR "xinput9_1_0.dll"
+#define WINE_FILEVERSION 9,10,455,0000
+#define WINE_FILEVERSION_STR "9.10.455.0000"
+#define WINE_PRODUCTVERSION 9,10,455,0000
+#define WINE_PRODUCTVERSION_STR "9.10"
+
+#include "wine/wine_common_ver.rc"
diff --git a/dlls/xinput9_1_0/xinput9_1_0.spec b/dlls/xinput9_1_0/xinput9_1_0.spec
new file mode 100644
index 0000000..5d95b3e
--- /dev/null
+++ b/dlls/xinput9_1_0/xinput9_1_0.spec
@@ -0,0 +1,4 @@
+@ stdcall XInputGetCapabilities(long long ptr) xinput1_3.XInputGetCapabilities
+@ stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr) xinput1_3.XInputGetDSoundAudioDeviceGuids
+@ stdcall XInputSetState(long ptr) xinput1_3.XInputSetState
+@ stdcall XInputGetState(long ptr) xinput1_3.XInputGetState
--
1.5.4.3