On Fri, Sep 12, 2008 at 1:04 AM, chourmovs vs <[EMAIL PROTECTED]> wrote: > No sorry > No time and no skill for that, but maybe i could help doing some tests >
In that case I will have a try at implementing it. Can someone have a look at this patch I made and offer any advice on where I may be going wrong (incorrect syntax, etc). This patch lets me load Assassin's Creed without complaining about missing the native dll (it's a start I guess), problem is that Assassin's Creed is so slow it's impossible to use for testing with a joystick. Regards, Andrew
From 7f787696983f11cde64e3707aa40afbe6d597c13 Mon Sep 17 00:00:00 2001 From: Andrew Fenn <[EMAIL PROTECTED]> Date: Fri, 12 Sep 2008 03:00:49 +0700 Subject: Started on implementing xinput for joystick support --- configure | 8 ++++++++ dlls/Makefile.in | 9 +++++++-- dlls/xinput/Makefile.in | 14 ++++++++++++++ dlls/xinput/version.rc | 26 ++++++++++++++++++++++++++ dlls/xinput/xinput1_3.spec | 7 +++++++ dlls/xinput/xinput_main.c | 40 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 dlls/xinput/Makefile.in create mode 100644 dlls/xinput/version.rc create mode 100644 dlls/xinput/xinput1_3.spec create mode 100644 dlls/xinput/xinput_main.c diff --git a/configure b/configure index e898943..2126335 100755 --- a/configure +++ b/configure @@ -25114,6 +25114,14 @@ dlls/wtsapi32/Makefile: dlls/wtsapi32/Makefile.in dlls/Makedll.rules" ac_config_files="$ac_config_files dlls/wtsapi32/Makefile" ALL_MAKEFILES="$ALL_MAKEFILES \\ + dlls/xinput/Makefile" +test "x$enable_xinput" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\ + xinput" +ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS +dlls/xinput/Makefile: dlls/xinput/Makefile.in dlls/Makedll.rules" +ac_config_files="$ac_config_files dlls/xinput/Makefile" + +ALL_MAKEFILES="$ALL_MAKEFILES \\ documentation/Makefile" test "x$enable_documentation" != xno && ALL_TOP_DIRS="$ALL_TOP_DIRS \\ documentation" diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 6680673..2f8a731 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -308,7 +308,8 @@ IMPORT_LIBS = \ wow32/libwow32.$(IMPLIBEXT) \ ws2_32/libws2_32.$(IMPLIBEXT) \ wsock32/libwsock32.$(IMPLIBEXT) \ - wtsapi32/libwtsapi32.$(IMPLIBEXT) + wtsapi32/libwtsapi32.$(IMPLIBEXT) \ + xinput/libxinput.$(IMPLIBEXT) CROSS_IMPLIBS = \ libd3dx9.a \ @@ -443,7 +444,8 @@ CROSS_IMPLIBS = \ wow32/libwow32.a \ ws2_32/libws2_32.a \ wsock32/libwsock32.a \ - wtsapi32/libwtsapi32.a + wtsapi32/libwtsapi32.a \ + xinput/libxinput.a $(TESTSUBDIRS:%=%/__crosstest__): $(CROSS_IMPLIBS) @@ -850,6 +852,9 @@ wsock32/libwsock32.def wsock32/libwsock32.a: wsock32/wsock32.spec $(WINEBUILD) wtsapi32/libwtsapi32.def wtsapi32/libwtsapi32.a: wtsapi32/wtsapi32.spec $(WINEBUILD) @cd wtsapi32 && $(MAKE) `basename [EMAIL PROTECTED] +xinput/libxinput.def xinput/libxinput.a: xinput/xinput.spec $(WINEBUILD) + @cd xinput && $(MAKE) `basename [EMAIL PROTECTED] + libd3dx9.a: d3dx9_36/libd3dx9.a $(RM) $@ && $(LN_S) d3dx9_36/libd3dx9.a $@ diff --git a/dlls/xinput/Makefile.in b/dlls/xinput/Makefile.in new file mode 100644 index 0000000..261be5a --- /dev/null +++ b/dlls/xinput/Makefile.in @@ -0,0 +1,14 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = xinput1_3.dll +IMPORTLIB = xinput +IMPORTS = kernel32 + +C_SRCS = \ + xinput_main.c + [EMAIL PROTECTED]@ + [EMAIL PROTECTED]@ # everything below this line is overwritten by make depend diff --git a/dlls/xinput/version.rc b/dlls/xinput/version.rc new file mode 100644 index 0000000..34b1ca0 --- /dev/null +++ b/dlls/xinput/version.rc @@ -0,0 +1,26 @@ +/* + * 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/xinput/xinput1_3.spec b/dlls/xinput/xinput1_3.spec new file mode 100644 index 0000000..5caaa37 --- /dev/null +++ b/dlls/xinput/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/xinput/xinput_main.c b/dlls/xinput/xinput_main.c new file mode 100644 index 0000000..b582aad --- /dev/null +++ b/dlls/xinput/xinput_main.c @@ -0,0 +1,40 @@ +/* XInput + * + * 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> + +#define COBJMACROS + +#include "wine/debug.h" +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +WINE_DEFAULT_DEBUG_CHANNEL(xinput); +static bool dll_enabled; + +/****************************************************************************** + * XInputEnable (XINPUT1.@) + */ +void XInputEnable(BOOL enable) { + dll_enabled = enabled; +} -- 1.5.4.3