39#define VID_MICROSOFT 0x045e
62 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x50, 0x49, 0x44, 0x56, 0x49, 0x44}
75 return &
This->base.IDirectInputDevice8A_iface;
79 return &
This->base.IDirectInputDevice8W_iface;
121 static const struct {
125#define FE(x) { x, #x}
143 WARN(
"Non-standard DIENVELOPE structure size %d.\n",
env->dwSize);
145 TRACE(
"Envelope has attack (level: %d time: %d), fade (level: %d time: %d)\n",
146 env->dwAttackLevel,
env->dwAttackTime,
env->dwFadeLevel,
env->dwFadeTime);
156 TRACE(
"Periodic force has magnitude %d, offset %d, phase %d, period %d\n",
162 TRACE(
"Ramp force has start %d, end %d\n",
168 TRACE(
"Condition has offset %d, pos/neg coefficients %d and %d, pos/neg saturations %d and %d, deadband %d\n",
176 TRACE(
"Custom force uses %d channels, sample period %d. Has %d samples at %p.\n",
179 WARN(
"Custom force has a non-integral samples-per-channel count!\n");
181 TRACE(
"Custom force data (time aligned, axes in order):\n");
195 TRACE(
"Dumping DIEFFECT structure:\n");
198 WARN(
"Non-standard DIEFFECT structure size %d\n", eff->
dwSize);
207 WARN(
"dwGain is out of range (>10,000)\n");
239 WARN(
"Effect claims to be a constant force but the type-specific params are the wrong size!\n");
245 WARN(
"Effect claims to be a periodic force but the type-specific params are the wrong size!\n");
251 WARN(
"Effect claims to be a ramp force but the type-specific params are the wrong size!\n");
263 WARN(
"Effect claims to be a condition but the type-specific params are the wrong size!\n");
267 WARN(
"Effect claims to be a custom force but the type-specific params are the wrong size!\n");
276 static const char disabled_str[] =
"disabled";
277 static const char joystick_key[] =
"Joysticks";
302 TRACE(
"Disabling joystick '%s' based on registry key.\n",
name);
341 switch (
This->base.data_format.wine_df->rgodf[
obj].dwOfs){
406 WARN(
"invalid parameter: ph == NULL\n");
419 for (
i = 0;
i <
This->base.data_format.wine_df->dwNumObjs;
i++)
434 for (
i = 0;
i <
This->base.data_format.wine_df->dwNumObjs;
i++)
449 for (
i = 0;
i <
This->base.data_format.wine_df->dwNumObjs;
i++)
479#define DEBUG_TYPE(x) case (x): str = #x; break
483 const char *
str, *hid =
"";
506 default:
str =
"UNKNOWN";
533 if (lpDIDevCaps ==
NULL) {
534 WARN(
"invalid pointer\n");
541 WARN(
"invalid parameter\n");
566 static const WCHAR axisW[] = {
'A',
'x',
'i',
's',
' ',
'%',
'd',0};
567 static const WCHAR povW[] = {
'P',
'O',
'V',
' ',
'%',
'd',0};
568 static const WCHAR buttonW[] = {
'B',
'u',
't',
't',
'o',
'n',
' ',
'%',
'd',0};
594 didoiW.
dwSize =
sizeof(didoiW);
662 didev.
dwSize =
sizeof(didev);
700 WARN(
"invalid pointer\n");
706 WARN(
"invalid parameter: pdidi->dwSize = %d\n", pdidi->
dwSize);
746 TRACE(
"(%p,%p)\n", iface, pdidi);
750 WARN(
"invalid parameter: pdidi->dwSize = %d\n", pdidi->
dwSize);
785 if (!
This->base.acquired) {
786 WARN(
"not acquired\n");
810 if (!
This->base.acquired) {
811 WARN(
"not acquired\n");
865 if (load_success)
return DI_OK;
881 if (
type & object_types[
j])
920 if (lpszUserName !=
NULL)
962 if (lpszUserName !=
NULL)
995 if (
abs(
val ) <= dead_zone / 2)
998 val =
val < 0 ?
val + dead_zone / 2 :
val - dead_zone / 2;
1006 else if (ret < props->lMin)
ret =
props->lMin;
1008 TRACE(
"(%d <%d> %d) -> (%d <%d> %d): val=%d ret=%d\n",
1027 return p->y < 0 ? 4500 : !
p->y ? 9000 : 13500;
1029 return p->y < 0 ? 31500 : !
p->y ? 27000 : 22500;
1031 return p->y < 0 ? 0 : !
p->y ? -1 : 18000;
1054 TRACE(
"setting default deadzone to: \"%s\" %d\n",
buffer,
This->deadzone);
1062 static const char *delim =
",";
1073 if (
value < 0 || *
s !=
'\0')
1075 ERR(
"invalid button number: \"%s\"",
token);
1090 static const char *axis_names[] = {
"X",
"Y",
"Z",
"Rx",
"Ry",
"Rz",
1091 "Slider1",
"Slider2",
1092 "POV1",
"POV2",
"POV3",
"POV4"};
1093 const char *delim =
",";
1111 WARN(
"Only 4 POVs supported - ignoring extra\n");
1117 This->axis_map[tokens++] =
i;
1125 FIXME(
"Only 8 Axes supported - ignoring extra\n");
1137 ERR(
"invalid joystick axis type: \"%s\"\n",
ptr);
1141 This->axis_map[tokens] =
i;
1145 if (tokens !=
This->device_axis_count)
1147 ERR(
"not all joystick axes mapped: %d axes(%d,%d), %d arguments\n",
1148 This->device_axis_count, axis, pov, tokens);
1149 while (tokens < This->device_axis_count)
1151 This->axis_map[tokens] = -1;
1161 if (default_axis_map)
1164 for (
i = 0;
i <
This->device_axis_count;
i++)
1166 This->axis_map[
i] = default_axis_map[
i];
1167 tokens = default_axis_map[
i];
1172 else if (tokens < 15)
1176 This->axis_map[
i] = default_axis_map[
i];
1183 for (
i = 0;
i <
This->device_axis_count;
i++)
1186 This->axis_map[
i] = axis++;
1189 This->axis_map[
i++] = 8 + pov;
1190 This->axis_map[
i ] = 8 + pov++;
1193 This->axis_map[
i] = -1;
1197 This->devcaps.dwAxes = axis;
1198 This->devcaps.dwPOVs = pov;
int strcmp(const char *String1, const char *String2)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strtok(char *String, const char *Delimiters)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
static LPCWSTR LPCWSTR LPCWSTR env
void _copy_diactionformatWtoA(LPDIACTIONFORMATA to, LPDIACTIONFORMATW from)
void _copy_diactionformatAtoW(LPDIACTIONFORMATW to, LPDIACTIONFORMATA from)
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
BOOL WINAPI GetUserNameW(LPWSTR lpszName, LPDWORD lpSize)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
static const WCHAR version[]
GLuint GLuint GLsizei GLenum type
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static const WCHAR buttonW[]
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
#define memcpy(s1, s2, n)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
#define IsEqualGUID(rguid1, rguid2)
DWORD dwPositiveSaturation
DWORD dwNegativeSaturation
LONG lNegativeCoefficient
LONG lPositiveCoefficient
DWORD dwFFMinTimeResolution
CHAR tszInstanceName[MAX_PATH]
CHAR tszProductName[MAX_PATH]
WCHAR tszProductName[MAX_PATH]
WCHAR tszInstanceName[MAX_PATH]
DWORD dwTriggerRepeatInterval
LPVOID lpvTypeSpecificParams
DWORD cbTypeSpecificParams
#define FIELD_OFFSET(t, f)
#define CONTAINING_RECORD(address, type, field)
static const WCHAR props[]
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid