Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenxinput1_3_main.c
Go to the documentation of this file.
00001 /* 00002 * The Wine project - Xinput Joystick Library 00003 * Copyright 2008 Andrew Fenn 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00018 */ 00019 00020 #include "config.h" 00021 #include <assert.h> 00022 #include <stdarg.h> 00023 #include <string.h> 00024 00025 #include "wine/debug.h" 00026 #include "windef.h" 00027 #include "winbase.h" 00028 #include "winerror.h" 00029 00030 #include "xinput.h" 00031 00032 WINE_DEFAULT_DEBUG_CHANNEL(xinput); 00033 00034 BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) 00035 { 00036 switch(reason) 00037 { 00038 case DLL_WINE_PREATTACH: 00039 return FALSE; /* prefer native version */ 00040 case DLL_PROCESS_ATTACH: 00041 DisableThreadLibraryCalls(inst); 00042 break; 00043 case DLL_PROCESS_DETACH: 00044 break; 00045 } 00046 return TRUE; 00047 } 00048 00049 void WINAPI XInputEnable(BOOL enable) 00050 { 00051 /* Setting to false will stop messages from XInputSetState being sent 00052 to the controllers. Setting to true will send the last vibration 00053 value (sent to XInputSetState) to the controller and allow messages to 00054 be sent */ 00055 FIXME("(%d) Stub!\n", enable); 00056 } 00057 00058 DWORD WINAPI XInputSetState(DWORD dwUserIndex, XINPUT_VIBRATION* pVibration) 00059 { 00060 FIXME("(%d %p) Stub!\n", dwUserIndex, pVibration); 00061 00062 if (dwUserIndex < XUSER_MAX_COUNT) 00063 { 00064 return ERROR_DEVICE_NOT_CONNECTED; 00065 /* If controller exists then return ERROR_SUCCESS */ 00066 } 00067 return ERROR_BAD_ARGUMENTS; 00068 } 00069 00070 DWORD WINAPI XInputGetState(DWORD dwUserIndex, XINPUT_STATE* pState) 00071 { 00072 static int warn_once; 00073 00074 if (!warn_once++) 00075 FIXME("(%u %p)\n", dwUserIndex, pState); 00076 00077 if (dwUserIndex < XUSER_MAX_COUNT) 00078 { 00079 return ERROR_DEVICE_NOT_CONNECTED; 00080 /* If controller exists then return ERROR_SUCCESS */ 00081 } 00082 return ERROR_BAD_ARGUMENTS; 00083 } 00084 00085 DWORD WINAPI XInputGetKeystroke(DWORD dwUserIndex, DWORD dwReserve, PXINPUT_KEYSTROKE pKeystroke) 00086 { 00087 FIXME("(%d %d %p) Stub!\n", dwUserIndex, dwReserve, pKeystroke); 00088 00089 if (dwUserIndex < XUSER_MAX_COUNT) 00090 { 00091 return ERROR_DEVICE_NOT_CONNECTED; 00092 /* If controller exists then return ERROR_SUCCESS */ 00093 } 00094 return ERROR_BAD_ARGUMENTS; 00095 } 00096 00097 DWORD WINAPI XInputGetCapabilities(DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES* pCapabilities) 00098 { 00099 static int warn_once; 00100 00101 if (!warn_once++) 00102 FIXME("(%d %d %p)\n", dwUserIndex, dwFlags, pCapabilities); 00103 00104 if (dwUserIndex < XUSER_MAX_COUNT) 00105 { 00106 return ERROR_DEVICE_NOT_CONNECTED; 00107 /* If controller exists then return ERROR_SUCCESS */ 00108 } 00109 return ERROR_BAD_ARGUMENTS; 00110 } 00111 00112 DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD dwUserIndex, GUID* pDSoundRenderGuid, GUID* pDSoundCaptureGuid) 00113 { 00114 FIXME("(%d %p %p) Stub!\n", dwUserIndex, pDSoundRenderGuid, pDSoundCaptureGuid); 00115 00116 if (dwUserIndex < XUSER_MAX_COUNT) 00117 { 00118 return ERROR_DEVICE_NOT_CONNECTED; 00119 /* If controller exists then return ERROR_SUCCESS */ 00120 } 00121 return ERROR_BAD_ARGUMENTS; 00122 } 00123 00124 DWORD WINAPI XInputGetBatteryInformation(DWORD dwUserIndex, BYTE deviceType, XINPUT_BATTERY_INFORMATION* pBatteryInfo) 00125 { 00126 FIXME("(%d %u %p) Stub!\n", dwUserIndex, deviceType, pBatteryInfo); 00127 00128 if (dwUserIndex < XUSER_MAX_COUNT) 00129 { 00130 return ERROR_DEVICE_NOT_CONNECTED; 00131 /* If controller exists then return ERROR_SUCCESS */ 00132 } 00133 return ERROR_BAD_ARGUMENTS; 00134 } Generated on Mon May 28 2012 04:26:45 for ReactOS by
1.7.6.1
|