Commit adfee25b authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput: Remove legacy joystick backends.

parent 7011685e
......@@ -731,7 +731,6 @@ SYSTEMCONFIGURATION_LIBS
APPKIT_LIBS
CORESERVICES_LIBS
APPLICATIONSERVICES_LIBS
FORCEFEEDBACK_LIBS
IOKIT_LIBS
COREFOUNDATION_LIBS
OBJCPP
......@@ -8764,8 +8763,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
IOKIT_LIBS="-framework IOKit -framework CoreFoundation"
FORCEFEEDBACK_LIBS="-framework ForceFeedback -framework CoreFoundation"
APPLICATIONSERVICES_LIBS="-framework ApplicationServices"
CORESERVICES_LIBS="-framework CoreServices"
......@@ -19615,7 +19612,6 @@ ALL_VARS_RULES="I386_LIBS = $I386_LIBS
OPENGL_LIBS = $OPENGL_LIBS
COREFOUNDATION_LIBS = $COREFOUNDATION_LIBS
IOKIT_LIBS = $IOKIT_LIBS
FORCEFEEDBACK_LIBS = $FORCEFEEDBACK_LIBS
APPLICATIONSERVICES_LIBS = $APPLICATIONSERVICES_LIBS
CORESERVICES_LIBS = $CORESERVICES_LIBS
APPKIT_LIBS = $APPKIT_LIBS
......
......@@ -740,7 +740,6 @@ case $host_os in
dnl declare needed frameworks
AC_SUBST(COREFOUNDATION_LIBS,"-framework CoreFoundation")
AC_SUBST(IOKIT_LIBS,"-framework IOKit -framework CoreFoundation")
AC_SUBST(FORCEFEEDBACK_LIBS,"-framework ForceFeedback -framework CoreFoundation")
AC_SUBST(APPLICATIONSERVICES_LIBS,"-framework ApplicationServices")
AC_SUBST(CORESERVICES_LIBS,"-framework CoreServices")
AC_SUBST(APPKIT_LIBS,"-framework AppKit")
......
......@@ -2,7 +2,6 @@ MODULE = dinput.dll
IMPORTLIB = dinput
IMPORTS = dinput dxguid uuid comctl32 ole32 user32 advapi32 hid setupapi
EXTRADEFS = -DDIRECTINPUT_VERSION=0x0700
EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS)
EXTRADLLFLAGS = -mcygwin
......@@ -12,12 +11,7 @@ C_SRCS = \
data_formats.c \
device.c \
dinput_main.c \
effect_linuxinput.c \
joystick.c \
joystick_hid.c \
joystick_linux.c \
joystick_linuxinput.c \
joystick_osx.c \
keyboard.c \
mouse.c
......
......@@ -187,11 +187,6 @@ void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) {
}
}
void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) {
TRACE(" - enumerating : %s ('%s') - %2d - 0x%08x - %s - 0x%x\n",
debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, ddoi->tszName, ddoi->dwFlags);
}
void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) {
TRACE(" - enumerating : %s ('%s'), - %2d - 0x%08x - %s - 0x%x\n",
debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, debugstr_w(ddoi->tszName), ddoi->dwFlags);
......@@ -437,7 +432,7 @@ void fill_DataFormat(void *out, DWORD size, const void *in, const DataFormat *df
}
}
void release_DataFormat(DataFormat * format)
static void release_DataFormat( DataFormat *format )
{
TRACE("Deleting DataFormat: %p\n", format);
......@@ -637,20 +632,7 @@ static int verify_offset(const DataFormat *df, int offset)
return -1;
}
/* find an object by its offset in a data format */
static int offset_to_object(const DataFormat *df, int offset)
{
int i;
if (!df->offsets) return -1;
for (i = 0; i < df->wine_df->dwNumObjs; i++)
if (df->offsets[i] == offset) return i;
return -1;
}
int id_to_object(LPCDIDATAFORMAT df, int id)
static int id_to_object( LPCDIDATAFORMAT df, int id )
{
int i;
......@@ -669,18 +651,6 @@ static int id_to_offset(const DataFormat *df, int id)
return obj >= 0 && df->offsets ? df->offsets[obj] : -1;
}
int find_property(const DataFormat *df, LPCDIPROPHEADER ph)
{
switch (ph->dwHow)
{
case DIPH_BYID: return id_to_object(df->wine_df, ph->dwObj);
case DIPH_BYOFFSET: return offset_to_object(df, ph->dwObj);
}
FIXME("Unhandled ph->dwHow=='%04X'\n", (unsigned int)ph->dwHow);
return -1;
}
static DWORD semantic_to_obj_id(IDirectInputDeviceImpl* This, DWORD dwSemantic)
{
DWORD type = (0x0000ff00 & dwSemantic) >> 8;
......
......@@ -102,43 +102,16 @@ extern BOOL device_instance_is_disabled( DIDEVICEINSTANCEW *instance, BOOL *over
/* Routines to do DataFormat / WineFormat conversions */
extern void fill_DataFormat(void *out, DWORD size, const void *in, const DataFormat *df) DECLSPEC_HIDDEN;
extern void release_DataFormat(DataFormat *df) DECLSPEC_HIDDEN;
extern void queue_event( IDirectInputDevice8W *iface, int inst_id, DWORD data, DWORD time, DWORD seq ) DECLSPEC_HIDDEN;
/* Helper functions to work with data format */
extern int id_to_object(LPCDIDATAFORMAT df, int id) DECLSPEC_HIDDEN;
extern int find_property(const DataFormat *df, LPCDIPROPHEADER ph) DECLSPEC_HIDDEN;
/* Common joystick stuff */
typedef struct
{
LONG lDevMin;
LONG lDevMax;
LONG lMin;
LONG lMax;
LONG lDeadZone;
LONG lSaturation;
} ObjProps;
extern DWORD joystick_map_pov(const POINTL *p) DECLSPEC_HIDDEN;
extern LONG joystick_map_axis(ObjProps *props, int val) DECLSPEC_HIDDEN;
typedef struct
{
struct list entry;
LPDIRECTINPUTEFFECT ref;
} effect_list_item;
extern const GUID dinput_pidvid_guid DECLSPEC_HIDDEN;
/* Various debug tools */
extern void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) DECLSPEC_HIDDEN;
extern void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) DECLSPEC_HIDDEN;
extern void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) DECLSPEC_HIDDEN;
extern void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) DECLSPEC_HIDDEN;
extern const char *_dump_dinput_GUID(const GUID *guid) DECLSPEC_HIDDEN;
extern LPDIOBJECTDATAFORMAT dataformat_to_odf_by_type(LPCDIDATAFORMAT df, int n, DWORD type) DECLSPEC_HIDDEN;
extern HRESULT _build_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, DWORD devMask, LPCDIDATAFORMAT df) DECLSPEC_HIDDEN;
extern HRESULT _set_action_map(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags, LPCDIDATAFORMAT df) DECLSPEC_HIDDEN;
......
......@@ -78,9 +78,6 @@ static const struct dinput_device *dinput_devices[] =
{
&mouse_device,
&keyboard_device,
&joystick_linuxinput_device,
&joystick_linux_device,
&joystick_osx_device,
&joystick_hid_device,
};
......
......@@ -68,9 +68,6 @@ struct DevicePlayer {
extern const struct dinput_device mouse_device DECLSPEC_HIDDEN;
extern const struct dinput_device keyboard_device DECLSPEC_HIDDEN;
extern const struct dinput_device joystick_hid_device DECLSPEC_HIDDEN;
extern const struct dinput_device joystick_linux_device DECLSPEC_HIDDEN;
extern const struct dinput_device joystick_linuxinput_device DECLSPEC_HIDDEN;
extern const struct dinput_device joystick_osx_device DECLSPEC_HIDDEN;
extern void dinput_hooks_acquire_device(LPDIRECTINPUTDEVICE8W iface);
extern void dinput_hooks_unacquire_device(LPDIRECTINPUTDEVICE8W iface);
......
......@@ -37,16 +37,16 @@
#include "dinput.h"
#include "setupapi.h"
#include "wine/debug.h"
#include "wine/hid.h"
#include "dinput_private.h"
#include "device_private.h"
#include "joystick_private.h"
#include "initguid.h"
#include "devpkey.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/hid.h"
WINE_DEFAULT_DEBUG_CHANNEL(dinput);
DEFINE_GUID( GUID_DEVINTERFACE_WINEXINPUT,0x6c53d5fd,0x6480,0x440f,0xb6,0x18,0x47,0x67,0x50,0xc5,0xe1,0xa6 );
......
/*
* Copyright 2009, Aric Stewart, CodeWeavers
*
* 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
*/
#ifndef __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H
#define __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "dinput.h"
#include "wine/list.h"
#include "wine/unicode.h"
#include "dinput_private.h"
#include "device_private.h"
/* Number of objects in the default data format */
#define MAX_PROPS 164
struct JoystickGenericImpl;
typedef void joy_polldev_handler( IDirectInputDevice8W *iface );
typedef struct JoystickGenericImpl
{
struct IDirectInputDeviceImpl base;
ObjProps props[MAX_PROPS];
DIDEVCAPS devcaps;
DIJOYSTATE2 js; /* wine data */
GUID guidProduct;
GUID guidInstance;
char *name;
int device_axis_count; /* Total number of axes in the device */
int *axis_map; /* User axes remapping */
LONG deadzone; /* Default dead-zone */
joy_polldev_handler *joy_polldev;
} JoystickGenericImpl;
LONG joystick_map_axis(ObjProps *props, int val) DECLSPEC_HIDDEN;
HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_map) DECLSPEC_HIDDEN;
DWORD joystick_map_pov(const POINTL *p) DECLSPEC_HIDDEN;
BOOL device_disabled_registry(const char* name) DECLSPEC_HIDDEN;
BOOL device_instance_is_disabled( DIDEVICEINSTANCEW *instance, BOOL *override ) DECLSPEC_HIDDEN;
ULONG WINAPI JoystickWGenericImpl_Release(LPDIRECTINPUTDEVICE8W iface);
HRESULT WINAPI JoystickWGenericImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) DECLSPEC_HIDDEN;
HRESULT WINAPI JoystickWGenericImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface, REFGUID rguid, LPDIPROPHEADER pdiph) DECLSPEC_HIDDEN;
HRESULT WINAPI JoystickWGenericImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W iface, LPDIDEVCAPS lpDIDevCaps) DECLSPEC_HIDDEN;
void _dump_DIDEVCAPS(const DIDEVCAPS *lpDIDevCaps) DECLSPEC_HIDDEN;
HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REFGUID rguid, LPCDIPROPHEADER ph) DECLSPEC_HIDDEN;
HRESULT WINAPI JoystickWGenericImpl_GetDeviceInfo( LPDIRECTINPUTDEVICE8W iface,
LPDIDEVICEINSTANCEW pdidi) DECLSPEC_HIDDEN;
HRESULT WINAPI JoystickWGenericImpl_Poll(LPDIRECTINPUTDEVICE8W iface) DECLSPEC_HIDDEN;
HRESULT WINAPI JoystickWGenericImpl_GetDeviceState(LPDIRECTINPUTDEVICE8W iface, DWORD len, LPVOID ptr) DECLSPEC_HIDDEN;
HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) DECLSPEC_HIDDEN;
HRESULT WINAPI JoystickWGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) DECLSPEC_HIDDEN;
DWORD typeFromGUID(REFGUID guid) DECLSPEC_HIDDEN;
void dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid, DWORD dwFlags) DECLSPEC_HIDDEN;
BOOL is_xinput_device(const DIDEVCAPS *devcaps, WORD vid, WORD pid) DECLSPEC_HIDDEN;
#endif /* __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H */
......@@ -2,7 +2,6 @@ MODULE = dinput8.dll
IMPORTLIB = dinput8
IMPORTS = dinput8 dxguid uuid comctl32 ole32 user32 advapi32 hid setupapi
EXTRADEFS = -DDIRECTINPUT_VERSION=0x0800
EXTRALIBS = $(IOKIT_LIBS) $(FORCEFEEDBACK_LIBS)
PARENTSRC = ../dinput
EXTRADLLFLAGS = -mcygwin
......@@ -13,12 +12,7 @@ C_SRCS = \
data_formats.c \
device.c \
dinput_main.c \
effect_linuxinput.c \
joystick.c \
joystick_hid.c \
joystick_linux.c \
joystick_linuxinput.c \
joystick_osx.c \
keyboard.c \
mouse.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment