diff --git a/README.md b/README.md index 88347cd..6da7e35 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Hacks Some applications need additional help to detect your game controller * [`CoSetProxyBlanket`-Hack](hack/CoSetProxyBlanket/README.md) +* [`builtinDll`-Hack](hack/builtinDll/README.md) Config --------------------- diff --git a/hack/builtinDll/README.md b/hack/builtinDll/README.md new file mode 100644 index 0000000..0652d81 --- /dev/null +++ b/hack/builtinDll/README.md @@ -0,0 +1,22 @@ +`builtin`-Hack +========= + +*adds Ordinal 100 function to wine builtindll* + +Applications that use SDL2 need this, or it wont use XInput... + +Build +--------- +``` +bash build.sh +``` + +Needs `libwine`.. + +Usage +--------- +Copy the files from `bin` into your wine-prefix, replacing the original files + +Alternative-Usage +--------- +Remove the `.so`-part and copy the files into the folder next to the game executeable diff --git a/hack/builtinDll/build.sh b/hack/builtinDll/build.sh new file mode 100644 index 0000000..6a0f1ba --- /dev/null +++ b/hack/builtinDll/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e + +for dll in 'xinput1_1' 'xinput1_2' 'xinput9_1_0' 'xinput1_3' 'xinput1_4' +do + pushd $dll + winemaker --nosource-fix --dll --wine32 --nomfc -ldl . -I../include + make + popd + cp $dll/$dll.dll.so bin/$dll.dll.so +done +echo "" +echo "" +echo "all done, files are in bin-folder" diff --git a/hack/builtinDll/include/config.h b/hack/builtinDll/include/config.h new file mode 100644 index 0000000..625e551 --- /dev/null +++ b/hack/builtinDll/include/config.h @@ -0,0 +1 @@ +#define __WINESRC__ diff --git a/hack/builtinDll/include/wine/wine_common_ver.rc b/hack/builtinDll/include/wine/wine_common_ver.rc new file mode 100644 index 0000000..cae5408 --- /dev/null +++ b/hack/builtinDll/include/wine/wine_common_ver.rc @@ -0,0 +1,124 @@ +/* + * Copyright 2001 Dmitry Timoshkov + * Copyright 2004 Ivan Leo Puoti + * + * 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 "winresrc.h" + +/* +Assign WINE_FILEVERSION and WINE_FILEVERSION_STR high enough number +to make sure that programs, relying on the version numbers, will +never complain. +*/ + +#ifndef WINE_FILEVERSION_MAJOR +#define WINE_FILEVERSION_MAJOR 10 +#endif + +#ifndef WINE_FILEVERSION_MINOR +#define WINE_FILEVERSION_MINOR 0 +#endif + +#ifndef WINE_FILEVERSION_BUILD +#define WINE_FILEVERSION_BUILD 0 +#endif + +#ifndef WINE_FILEVERSION_PLATFORMID +#define WINE_FILEVERSION_PLATFORMID 0 +#endif + +#ifndef WINE_FILEVERSION +#define WINE_FILEVERSION WINE_FILEVERSION_MAJOR,WINE_FILEVERSION_MINOR,\ + WINE_FILEVERSION_BUILD,WINE_FILEVERSION_PLATFORMID +#endif + +#define WINE_VER_STRINGIZE2(x) #x +#define WINE_VER_STRINGIZE(x) WINE_VER_STRINGIZE2(x) + +#ifndef WINE_FILEVERSION_STR +#define WINE_FILEVERSION_STR WINE_VER_STRINGIZE(WINE_FILEVERSION_MAJOR.WINE_FILEVERSION_MINOR.WINE_FILEVERSION_BUILD.WINE_FILEVERSION_PLATFORMID) +#endif + +#ifndef WINE_FILEDESCRIPTION_STR +#define WINE_FILEDESCRIPTION_STR "Wine core dll" +#endif + +#ifndef WINE_FILENAME +#define WINE_FILENAME "" +#endif + +#ifndef WINE_FILENAME_STR +#define WINE_FILENAME_STR "" +#endif + +#ifndef WINE_FILETYPE +#define WINE_FILETYPE VFT_DLL +#endif + +#ifndef WINE_FILESUBTYPE +#define WINE_FILESUBTYPE VFT2_UNKNOWN +#endif + +#ifndef WINE_LEGALCOPYRIGHT +#define WINE_LEGALCOPYRIGHT "Copyright (c) 1993-2015 the Wine project authors (see the file AUTHORS for a complete list)" +#endif + +#ifndef WINE_PRODUCTVERSION +#define WINE_PRODUCTVERSION 1,0,0,0 +#endif + +#ifndef WINE_PRODUCTVERSION_STR +#define WINE_PRODUCTVERSION_STR "1.0" +#endif + +#ifndef WINE_PRODUCTNAME_STR +#define WINE_PRODUCTNAME_STR "Wine" +#endif + +#ifndef WINE_EXTRAVALUES +#define WINE_EXTRAVALUES +#endif + +VS_VERSION_INFO VERSIONINFO +FILEVERSION WINE_FILEVERSION +PRODUCTVERSION WINE_PRODUCTVERSION +FILEFLAGSMASK 63 +FILEFLAGS 0 +FILEOS VOS_UNKNOWN +FILETYPE WINE_FILETYPE +FILESUBTYPE WINE_FILESUBTYPE +{ + BLOCK "StringFileInfo" + { + BLOCK "040904E4" /* LANG_ENGLISH/SUBLANG_DEFAULT, CP 1252 */ + { + VALUE "CompanyName", "Microsoft Corporation" /* GameGuard depends on this */ + VALUE "FileDescription", WINE_FILEDESCRIPTION_STR + VALUE "FileVersion", WINE_FILEVERSION_STR + VALUE "InternalName", WINE_FILENAME + VALUE "LegalCopyright", WINE_LEGALCOPYRIGHT + VALUE "OriginalFilename", WINE_FILENAME_STR + VALUE "ProductName", WINE_PRODUCTNAME_STR + VALUE "ProductVersion", WINE_PRODUCTVERSION_STR + WINE_EXTRAVALUES + } + } + BLOCK "VarFileInfo" + { + VALUE "Translation", 0x0409, 0x04E4 /* LANG_ENGLISH/SUBLANG_DEFAULT, CP 1252 */ + } +} diff --git a/hack/builtinDll/xinput1_1/Makefile.in b/hack/builtinDll/xinput1_1/Makefile.in new file mode 100644 index 0000000..364c9db --- /dev/null +++ b/hack/builtinDll/xinput1_1/Makefile.in @@ -0,0 +1,6 @@ +MODULE = xinput1_1.dll + +C_SRCS = \ + xinput1_1_main.c + +RC_SRCS = version.rc diff --git a/hack/builtinDll/xinput1_1/version.rc b/hack/builtinDll/xinput1_1/version.rc new file mode 100644 index 0000000..e93aa90 --- /dev/null +++ b/hack/builtinDll/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/hack/builtinDll/xinput1_1/xinput1_1.spec b/hack/builtinDll/xinput1_1/xinput1_1.spec new file mode 100644 index 0000000..8420b19 --- /dev/null +++ b/hack/builtinDll/xinput1_1/xinput1_1.spec @@ -0,0 +1,10 @@ +1 stdcall -private DllMain(long long ptr) +2 stdcall XInputGetState(long ptr) xinput1_3.XInputGetState +3 stdcall XInputSetState(long ptr) xinput1_3.XInputSetState +4 stdcall XInputGetCapabilities(long long ptr) xinput1_3.XInputGetCapabilities +5 stdcall XInputEnable(long) xinput1_3.XInputEnable +6 stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr) xinput1_3.XInputGetDSoundAudioDeviceGuids +7 stdcall XInputGetBatteryInformation(long ptr ptr) xinput1_3.XInputGetBatteryInformation +8 stdcall XInputGetKeystroke(long long ptr) xinput1_3.XInputGetKeystroke +10 stdcall XInputGetAudioDeviceIds(long ptr ptr ptr ptr) xinput1_3.XInputGetAudioDeviceIds +100 stdcall _XInputGetStateEx(long ptr) xinput1_3.XInputGetState diff --git a/hack/builtinDll/xinput1_1/xinput1_1_main.c b/hack/builtinDll/xinput1_1/xinput1_1_main.c new file mode 100644 index 0000000..2de4317 --- /dev/null +++ b/hack/builtinDll/xinput1_1/xinput1_1_main.c @@ -0,0 +1,37 @@ +/* + * 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 + +#include "windef.h" +#include "winbase.h" + +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; + } + return TRUE; +} diff --git a/hack/builtinDll/xinput1_2/Makefile.in b/hack/builtinDll/xinput1_2/Makefile.in new file mode 100644 index 0000000..3eaec14 --- /dev/null +++ b/hack/builtinDll/xinput1_2/Makefile.in @@ -0,0 +1,6 @@ +MODULE = xinput1_2.dll + +C_SRCS = \ + xinput1_2_main.c + +RC_SRCS = version.rc diff --git a/hack/builtinDll/xinput1_2/version.rc b/hack/builtinDll/xinput1_2/version.rc new file mode 100644 index 0000000..5dec834 --- /dev/null +++ b/hack/builtinDll/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/hack/builtinDll/xinput1_2/xinput1_2.spec b/hack/builtinDll/xinput1_2/xinput1_2.spec new file mode 100644 index 0000000..8420b19 --- /dev/null +++ b/hack/builtinDll/xinput1_2/xinput1_2.spec @@ -0,0 +1,10 @@ +1 stdcall -private DllMain(long long ptr) +2 stdcall XInputGetState(long ptr) xinput1_3.XInputGetState +3 stdcall XInputSetState(long ptr) xinput1_3.XInputSetState +4 stdcall XInputGetCapabilities(long long ptr) xinput1_3.XInputGetCapabilities +5 stdcall XInputEnable(long) xinput1_3.XInputEnable +6 stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr) xinput1_3.XInputGetDSoundAudioDeviceGuids +7 stdcall XInputGetBatteryInformation(long ptr ptr) xinput1_3.XInputGetBatteryInformation +8 stdcall XInputGetKeystroke(long long ptr) xinput1_3.XInputGetKeystroke +10 stdcall XInputGetAudioDeviceIds(long ptr ptr ptr ptr) xinput1_3.XInputGetAudioDeviceIds +100 stdcall _XInputGetStateEx(long ptr) xinput1_3.XInputGetState diff --git a/hack/builtinDll/xinput1_2/xinput1_2_main.c b/hack/builtinDll/xinput1_2/xinput1_2_main.c new file mode 100644 index 0000000..2de4317 --- /dev/null +++ b/hack/builtinDll/xinput1_2/xinput1_2_main.c @@ -0,0 +1,37 @@ +/* + * 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 + +#include "windef.h" +#include "winbase.h" + +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; + } + return TRUE; +} diff --git a/hack/builtinDll/xinput1_3/Makefile.in b/hack/builtinDll/xinput1_3/Makefile.in new file mode 100644 index 0000000..cf8f730 --- /dev/null +++ b/hack/builtinDll/xinput1_3/Makefile.in @@ -0,0 +1,7 @@ +MODULE = xinput1_3.dll +IMPORTLIB = xinput + +C_SRCS = \ + xinput1_3_main.c + +RC_SRCS = version.rc diff --git a/hack/builtinDll/xinput1_3/version.rc b/hack/builtinDll/xinput1_3/version.rc new file mode 100644 index 0000000..191b142 --- /dev/null +++ b/hack/builtinDll/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/hack/builtinDll/xinput1_3/xinput1_3.spec b/hack/builtinDll/xinput1_3/xinput1_3.spec new file mode 100644 index 0000000..66a5477 --- /dev/null +++ b/hack/builtinDll/xinput1_3/xinput1_3.spec @@ -0,0 +1,10 @@ +1 stdcall -private DllMain(long long ptr) +2 stdcall XInputGetState(long ptr) +3 stdcall XInputSetState(long ptr) +4 stdcall XInputGetCapabilities(long long ptr) +5 stdcall XInputEnable(long) +6 stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr) +7 stdcall XInputGetBatteryInformation(long ptr ptr) +8 stdcall XInputGetKeystroke(long long ptr) +10 stdcall XInputGetAudioDeviceIds(long ptr ptr ptr ptr) +100 stdcall _XInputGetStateEx(long ptr) xinput1_3.XInputGetState diff --git a/hack/builtinDll/xinput1_3/xinput1_3_main.c b/hack/builtinDll/xinput1_3/xinput1_3_main.c new file mode 100644 index 0000000..7ce90b6 --- /dev/null +++ b/hack/builtinDll/xinput1_3/xinput1_3_main.c @@ -0,0 +1,144 @@ +/* + * 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 +#include +#include + +#include "wine/debug.h" +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +#include "xinput.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; + } + return TRUE; +} + +void WINAPI XInputEnable(BOOL enable) +{ + /* Setting to false will stop messages from XInputSetState being sent + to the controllers. Setting to true will send the last vibration + value (sent to XInputSetState) to the controller and allow messages to + be sent */ + FIXME("(%d) Stub!\n", enable); +} + +DWORD WINAPI XInputSetState(DWORD dwUserIndex, XINPUT_VIBRATION* pVibration) +{ + FIXME("(%d %p) Stub!\n", dwUserIndex, pVibration); + + if (dwUserIndex < XUSER_MAX_COUNT) + { + return ERROR_DEVICE_NOT_CONNECTED; + /* If controller exists then return ERROR_SUCCESS */ + } + return ERROR_BAD_ARGUMENTS; +} + +DWORD WINAPI XInputGetState(DWORD dwUserIndex, XINPUT_STATE* pState) +{ + static int warn_once; + + if (!warn_once++) + FIXME("(%u %p)\n", dwUserIndex, pState); + + if (dwUserIndex < XUSER_MAX_COUNT) + { + return ERROR_DEVICE_NOT_CONNECTED; + /* If controller exists then return ERROR_SUCCESS */ + } + return ERROR_BAD_ARGUMENTS; +} + +DWORD WINAPI XInputGetKeystroke(DWORD dwUserIndex, DWORD dwReserve, PXINPUT_KEYSTROKE pKeystroke) +{ + FIXME("(%d %d %p) Stub!\n", dwUserIndex, dwReserve, pKeystroke); + + if (dwUserIndex < XUSER_MAX_COUNT) + { + return ERROR_DEVICE_NOT_CONNECTED; + /* If controller exists then return ERROR_SUCCESS */ + } + return ERROR_BAD_ARGUMENTS; +} + +DWORD WINAPI XInputGetCapabilities(DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES* pCapabilities) +{ + static int warn_once; + + if (!warn_once++) + FIXME("(%d %d %p)\n", dwUserIndex, dwFlags, pCapabilities); + + if (dwUserIndex < XUSER_MAX_COUNT) + { + return ERROR_DEVICE_NOT_CONNECTED; + /* If controller exists then return ERROR_SUCCESS */ + } + return ERROR_BAD_ARGUMENTS; +} + +DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD dwUserIndex, GUID* pDSoundRenderGuid, GUID* pDSoundCaptureGuid) +{ + FIXME("(%d %p %p) Stub!\n", dwUserIndex, pDSoundRenderGuid, pDSoundCaptureGuid); + + if (dwUserIndex < XUSER_MAX_COUNT) + { + return ERROR_DEVICE_NOT_CONNECTED; + /* If controller exists then return ERROR_SUCCESS */ + } + return ERROR_BAD_ARGUMENTS; +} + +DWORD WINAPI XInputGetBatteryInformation(DWORD dwUserIndex, BYTE deviceType, XINPUT_BATTERY_INFORMATION* pBatteryInfo) +{ + FIXME("(%d %u %p) Stub!\n", dwUserIndex, deviceType, pBatteryInfo); + + if (dwUserIndex < XUSER_MAX_COUNT) + { + return ERROR_DEVICE_NOT_CONNECTED; + /* If controller exists then return ERROR_SUCCESS */ + } + return ERROR_BAD_ARGUMENTS; +} + +DWORD WINAPI XInputGetAudioDeviceIds(DWORD dwUserIndex, LPWSTR pRenderDeviceId, UINT* pRenderCount, LPWSTR pCaptureDeviceId, UINT* pCaptureCount) +{ + FIXME("(%d %p %p %p %p) Stub!\n", dwUserIndex, pRenderDeviceId, pRenderCount, pCaptureDeviceId, pCaptureCount); + + if (dwUserIndex < XUSER_MAX_COUNT) + { + return ERROR_DEVICE_NOT_CONNECTED; + /* If controller exists then return ERROR_SUCCESS */ + } + return ERROR_BAD_ARGUMENTS; +} diff --git a/hack/builtinDll/xinput1_4/Makefile.in b/hack/builtinDll/xinput1_4/Makefile.in new file mode 100644 index 0000000..43d1812 --- /dev/null +++ b/hack/builtinDll/xinput1_4/Makefile.in @@ -0,0 +1,6 @@ +MODULE = xinput1_4.dll + +C_SRCS = \ + xinput1_4_main.c + +RC_SRCS = version.rc diff --git a/hack/builtinDll/xinput1_4/version.rc b/hack/builtinDll/xinput1_4/version.rc new file mode 100644 index 0000000..e100371 --- /dev/null +++ b/hack/builtinDll/xinput1_4/version.rc @@ -0,0 +1,27 @@ +/* + * The Wine project - Xinput Joystick Library + * Copyright 2014 Andrey Gusev + * + * 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_4.dll" +#define WINE_FILEVERSION 6,3,9600,16384 +#define WINE_FILEVERSION_STR "6.3.9600.16384" +#define WINE_PRODUCTVERSION 6,3,9600,16384 +#define WINE_PRODUCTVERSION_STR "6.3" + +#include "wine/wine_common_ver.rc" diff --git a/hack/builtinDll/xinput1_4/xinput1_4.spec b/hack/builtinDll/xinput1_4/xinput1_4.spec new file mode 100644 index 0000000..9d08286 --- /dev/null +++ b/hack/builtinDll/xinput1_4/xinput1_4.spec @@ -0,0 +1,9 @@ +1 stdcall -private DllMain(long long ptr) +2 stdcall XInputGetState(long ptr) xinput1_3.XInputGetState +3 stdcall XInputSetState(long ptr) xinput1_3.XInputSetState +4 stdcall XInputGetCapabilities(long long ptr) xinput1_3.XInputGetCapabilities +5 stdcall XInputEnable(long) xinput1_3.XInputEnable +6 stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr) xinput1_3.XInputGetDSoundAudioDeviceGuids +7 stdcall XInputGetBatteryInformation(long ptr ptr) xinput1_3.XInputGetBatteryInformation +8 stdcall XInputGetKeystroke(long long ptr) xinput1_3.XInputGetKeystroke +10 stub XInputGetAudioDeviceIds(long ptr ptr ptr ptr) diff --git a/hack/builtinDll/xinput1_4/xinput1_4_main.c b/hack/builtinDll/xinput1_4/xinput1_4_main.c new file mode 100644 index 0000000..f91a3c5 --- /dev/null +++ b/hack/builtinDll/xinput1_4/xinput1_4_main.c @@ -0,0 +1,37 @@ +/* + * The Wine project - Xinput Joystick Library + * Copyright 2013 André Hentschel + * + * 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 + +#include "windef.h" +#include "winbase.h" + +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; + } + return TRUE; +} diff --git a/hack/builtinDll/xinput9_1_0/Makefile.in b/hack/builtinDll/xinput9_1_0/Makefile.in new file mode 100644 index 0000000..df8a574 --- /dev/null +++ b/hack/builtinDll/xinput9_1_0/Makefile.in @@ -0,0 +1,6 @@ +MODULE = xinput9_1_0.dll + +C_SRCS = \ + xinput9_1_0_main.c + +RC_SRCS = version.rc diff --git a/hack/builtinDll/xinput9_1_0/version.rc b/hack/builtinDll/xinput9_1_0/version.rc new file mode 100644 index 0000000..9e4d13e --- /dev/null +++ b/hack/builtinDll/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/hack/builtinDll/xinput9_1_0/xinput9_1_0.spec b/hack/builtinDll/xinput9_1_0/xinput9_1_0.spec new file mode 100644 index 0000000..8420b19 --- /dev/null +++ b/hack/builtinDll/xinput9_1_0/xinput9_1_0.spec @@ -0,0 +1,10 @@ +1 stdcall -private DllMain(long long ptr) +2 stdcall XInputGetState(long ptr) xinput1_3.XInputGetState +3 stdcall XInputSetState(long ptr) xinput1_3.XInputSetState +4 stdcall XInputGetCapabilities(long long ptr) xinput1_3.XInputGetCapabilities +5 stdcall XInputEnable(long) xinput1_3.XInputEnable +6 stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr) xinput1_3.XInputGetDSoundAudioDeviceGuids +7 stdcall XInputGetBatteryInformation(long ptr ptr) xinput1_3.XInputGetBatteryInformation +8 stdcall XInputGetKeystroke(long long ptr) xinput1_3.XInputGetKeystroke +10 stdcall XInputGetAudioDeviceIds(long ptr ptr ptr ptr) xinput1_3.XInputGetAudioDeviceIds +100 stdcall _XInputGetStateEx(long ptr) xinput1_3.XInputGetState diff --git a/hack/builtinDll/xinput9_1_0/xinput9_1_0_main.c b/hack/builtinDll/xinput9_1_0/xinput9_1_0_main.c new file mode 100644 index 0000000..2de4317 --- /dev/null +++ b/hack/builtinDll/xinput9_1_0/xinput9_1_0_main.c @@ -0,0 +1,37 @@ +/* + * 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 + +#include "windef.h" +#include "winbase.h" + +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; + } + return TRUE; +}