reactos/dll/win32/xinput1_3/xinput1_3_main.c
Hermès Bélusca-Maïto e1ef078741 Create this branch to work on loading of different Kernel-Debugger DLL providers, and see whether it is possible to move KDBG from ntoskrnl to a new DLL called, say, KDROSDBG.DLL.
The idea then would be to have the following behaviour (when specifying the following options in the kernel command line):

/DEBUGPORT=COMi --> load KDCOM.DLL and use COMi port (i == 1,2,3,4) if possible.
/DEBUGPORT=FOO  --> load KDFOO.DLL (useful for KDUSB.DLL, KD1394.DLL, KDBAZIS.DLL for VirtualKD, etc...)
/DEBUGPORT=ROSDBG:[COMi|SCREEN|FILE|GDB|...] --> load KDROSDBG.DLL which contains the ROS kernel debugger, and use COMi or SCREEN or... as output port.

svn path=/branches/kd++/; revision=58883
2013-04-28 13:26:45 +00:00

135 lines
3.8 KiB
C

/*
* 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"
#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;
case DLL_PROCESS_DETACH:
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;
}