38#ifdef HAVE_SYS_IOCTL_H
42#ifdef HAVE_LINUX_INPUT_H
43# include <linux/input.h>
45# if defined(EVIOCGBIT) && defined(EV_ABS) && defined(BTN_PINKIE)
46# define HAS_PROPER_HEADER
54#include "wine/unicode.h"
67#ifdef HAS_PROPER_HEADER
71#define EVDEVPREFIX "/dev/input/event"
72#define EVDEVDRIVER " (event)"
75#define WINE_JOYSTICK_MAX_AXES 8
76#define WINE_JOYSTICK_MAX_POVS 4
77#define WINE_JOYSTICK_MAX_BUTTONS 128
79struct wine_input_absinfo {
87enum wine_joystick_linuxinput_fd_state {
88 WINE_FD_STATE_CLOSED = 0,
90 WINE_FD_STATE_DISCONNECTED,
91 WINE_FD_STATE_INVALID,
101typedef struct JoystickImpl JoystickImpl;
102static const IDirectInputDevice8AVtbl JoystickAvt;
103static const IDirectInputDevice8WVtbl JoystickWvt;
111 BOOL has_ff, is_joystick;
115 BYTE evbits[(EV_MAX+7)/8];
116 BYTE absbits[(ABS_MAX+7)/8];
117 BYTE keybits[(KEY_MAX+7)/8];
118 BYTE ffbits[(FF_MAX+7)/8];
121 struct wine_input_absinfo axes[ABS_MAX];
123 WORD vendor_id, product_id, bus_type;
129 struct JoyDev *joydev;
133 enum wine_joystick_linuxinput_fd_state joyfd_state;
135 int dev_axes_to_di[ABS_MAX];
142 struct list ff_effects;
161 return &
This->generic.base.IDirectInputDevice8W_iface;
164static void fake_current_js_state(JoystickImpl *ji);
165static void find_joydevs(
void);
169static const GUID DInput_Wine_Joystick_Base_GUID = {
173 {0x8d, 0x4a, 0x23, 0x90, 0x3f, 0xb6, 0xbd, 0xf7}
176#define test_bit(arr,bit) (((BYTE*)(arr))[(bit)>>3]&(1<<((bit)&7)))
180static int have_joydevs = -1;
181static struct JoyDev *joydevs =
NULL;
183static void find_joydevs(
void)
191 for (
i = 0;
i < MAX_JOYDEV;
i++)
194 struct JoyDev joydev = {0};
198 struct JoyDev *new_joydevs;
199 struct input_id device_id = {0};
212 if (
ioctl(
fd, EVIOCGBIT(0,
sizeof(joydev.evbits)), joydev.evbits) == -1)
218 if (
ioctl(
fd, EVIOCGBIT(EV_ABS,
sizeof(joydev.absbits)), joydev.absbits) == -1)
224 if (
ioctl(
fd, EVIOCGBIT(EV_KEY,
sizeof(joydev.keybits)), joydev.keybits) == -1)
233 if (((!
test_bit(joydev.absbits, ABS_X) || !
test_bit(joydev.absbits, ABS_Y)) &&
234 !
test_bit(joydev.absbits, ABS_WHEEL) &&
235 !
test_bit(joydev.absbits, ABS_GAS) &&
236 !
test_bit(joydev.absbits, ABS_BRAKE)) ||
237 !(
test_bit(joydev.keybits, BTN_TRIGGER) ||
240 test_bit(joydev.keybits, BTN_BASE) ||
241 test_bit(joydev.keybits, BTN_GEAR_UP) ||
242 test_bit(joydev.keybits, BTN_GEAR_DOWN)))
252 test_bit(joydev.keybits, BTN_TRIGGER) ||
253 test_bit(joydev.keybits, BTN_THUMB) ||
254 test_bit(joydev.keybits, BTN_THUMB2) ||
255 test_bit(joydev.keybits, BTN_TOP) ||
256 test_bit(joydev.keybits, BTN_TOP2) ||
257 test_bit(joydev.keybits, BTN_PINKIE) ||
258 test_bit(joydev.keybits, BTN_BASE) ||
259 test_bit(joydev.keybits, BTN_BASE2) ||
260 test_bit(joydev.keybits, BTN_BASE3) ||
261 test_bit(joydev.keybits, BTN_BASE4) ||
262 test_bit(joydev.keybits, BTN_BASE5) ||
263 test_bit(joydev.keybits, BTN_BASE6) ||
264 test_bit(joydev.keybits, BTN_GEAR_UP) ||
265 test_bit(joydev.keybits, BTN_GEAR_DOWN) ||
281 strcat(joydev.name, EVDEVDRIVER);
284 joydev.name = joydev.device;
289 if (joydev.name != joydev.device)
294 joydev.guid = DInput_Wine_Joystick_Base_GUID;
295 joydev.guid.Data3 += have_joydevs;
297 TRACE(
"Found a joystick on %s: %s (%s)\n",
298 joydev.device, joydev.name,
302#ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION
305 ioctl(
fd, EVIOCGBIT(EV_FF,
sizeof(joydev.ffbits)), joydev.ffbits) != -1 &&
306 ioctl(
fd, EVIOCGEFFECTS, &joydev.num_effects) != -1 &&
307 joydev.num_effects > 0)
309 TRACE(
" ... with force feedback\n");
310 joydev.has_ff =
TRUE;
314 for (
j = 0;
j < ABS_MAX;
j ++)
316 if (!
test_bit(joydev.absbits,
j))
continue;
317 if (
ioctl(
fd, EVIOCGABS(
j), &(joydev.axes[
j])) != -1)
319 TRACE(
" ... with axis %d: cur=%d, min=%d, max=%d, fuzz=%d, flat=%d\n",
321 joydev.axes[
j].value,
322 joydev.axes[
j].minimum,
323 joydev.axes[
j].maximum,
330 if (
ioctl(
fd, EVIOCGID, &device_id) == -1)
333 joydev.guid_product = DInput_Wine_Joystick_Base_GUID;
337 joydev.vendor_id = device_id.vendor;
338 joydev.product_id = device_id.product;
339 joydev.bus_type = device_id.bustype;
343 joydev.guid_product.Data1 =
MAKELONG(joydev.vendor_id, joydev.product_id);
356 joydevs = new_joydevs;
357 joydevs[have_joydevs] = joydev;
378 if (joydevs[
id].bus_type == BUS_USB &&
379 joydevs[
id].vendor_id && joydevs[
id].product_id)
383 if (joydevs[
id].is_joystick)
398 lpddiW.
dwSize =
sizeof(lpddiW);
399 fill_joystick_dideviceinstanceW(&lpddiW,
version,
id);
420 if (
id >= have_joydevs) {
424 if (!((dwDevType == 0) ||
429#ifndef HAVE_STRUCT_FF_EFFECT_DIRECTION
435 fill_joystick_dideviceinstanceA(lpddi,
version,
id);
445 if (
id >= have_joydevs) {
449 if (!((dwDevType == 0) ||
454#ifndef HAVE_STRUCT_FF_EFFECT_DIRECTION
460 fill_joystick_dideviceinstanceW(lpddi,
version,
id);
468 JoystickImpl* newDevice;
471 int default_axis_map[WINE_JOYSTICK_MAX_AXES + WINE_JOYSTICK_MAX_POVS*2];
475 if (!newDevice)
return NULL;
477 newDevice->generic.base.IDirectInputDevice8A_iface.lpVtbl = &JoystickAvt;
478 newDevice->generic.base.IDirectInputDevice8W_iface.lpVtbl = &JoystickWvt;
479 newDevice->generic.base.ref = 1;
480 newDevice->generic.base.guid = *rguid;
481 newDevice->generic.base.dinput = dinput;
482 newDevice->generic.joy_polldev = joy_polldev;
483 newDevice->joyfd = -1;
484 newDevice->joyfd_state = WINE_FD_STATE_CLOSED;
485 newDevice->joydev = &joydevs[
index];
486 newDevice->generic.name = newDevice->joydev->name;
488#ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION
489 newDevice->ff_state = FF_STATUS_STOPPED;
494 newDevice->ff_autocenter = 1;
495 newDevice->ff_gain = 0xFFFF;
497 newDevice->generic.base.crit.DebugInfo->Spare[0] = (
DWORD_PTR)(__FILE__
": JoystickImpl*->base.crit");
500 for (
i = 0;
i < ABS_MAX;
i++)
502 if (
idx < WINE_JOYSTICK_MAX_AXES &&
506 newDevice->generic.device_axis_count++;
507 newDevice->dev_axes_to_di[
i] =
idx;
508 newDevice->generic.props[
idx].lDevMin = newDevice->joydev->axes[
i].minimum;
509 newDevice->generic.props[
idx].lDevMax = newDevice->joydev->axes[
i].maximum;
510 if (
i >= 8 &&
i <= 10)
511 default_axis_map[
idx] =
i - 8;
513 default_axis_map[
idx] =
i;
517 newDevice->dev_axes_to_di[
i] = -1;
520 for (
i = 0;
i < WINE_JOYSTICK_MAX_POVS;
i++)
522 if (
test_bit(newDevice->joydev->absbits, ABS_HAT0X +
i * 2) &&
523 test_bit(newDevice->joydev->absbits, ABS_HAT0Y +
i * 2))
525 newDevice->generic.device_axis_count += 2;
526 newDevice->generic.props[
idx ].lDevMin = newDevice->joydev->axes[ABS_HAT0X +
i * 2].minimum;
527 newDevice->generic.props[
idx ].lDevMax = newDevice->joydev->axes[ABS_HAT0X +
i * 2].maximum;
528 newDevice->dev_axes_to_di[ABS_HAT0X +
i * 2] =
idx;
529 newDevice->generic.props[
idx+1].lDevMin = newDevice->joydev->axes[ABS_HAT0Y +
i * 2].minimum;
530 newDevice->generic.props[
idx+1].lDevMax = newDevice->joydev->axes[ABS_HAT0Y +
i * 2].maximum;
531 newDevice->dev_axes_to_di[ABS_HAT0Y +
i * 2] =
idx + 1;
533 default_axis_map[
idx] = default_axis_map[
idx + 1] = WINE_JOYSTICK_MAX_AXES +
i;
537 newDevice->dev_axes_to_di[ABS_HAT0X +
i * 2] = newDevice->dev_axes_to_di[ABS_HAT0Y +
i * 2] = -1;
552 for (
i = 0,
idx = 0;
i < newDevice->generic.device_axis_count;
i++)
554 int wine_obj = newDevice->generic.axis_map[
i];
556 if (wine_obj < 0)
continue;
567 newDevice->generic.props[
idx].lMin = 0;
568 newDevice->generic.props[
idx].lMax = 0xffff;
569 newDevice->generic.props[
idx].lSaturation = 0;
570 newDevice->generic.props[
idx].lDeadZone = newDevice->generic.deadzone;
573 if (newDevice->joydev->has_ff && (
i == 0 ||
i == 1))
580 for (
i = 0;
i < KEY_MAX && newDevice->generic.devcaps.dwButtons < WINE_JOYSTICK_MAX_BUTTONS;
i++)
582 if (!
test_bit(newDevice->joydev->keybits,
i))
continue;
585 newDevice->buttons[
i] = 0x80 | newDevice->generic.devcaps.dwButtons;
590 newDevice->generic.base.data_format.wine_df = df;
592 fake_current_js_state(newDevice);
595 newDevice->generic.devcaps.dwSize =
sizeof(newDevice->generic.devcaps);
599 fill_joystick_dideviceinstanceW(&ddi, newDevice->generic.base.dinput->dwVersion,
index);
600 newDevice->generic.devcaps.dwDevType = ddi.
dwDevType;
602 if (newDevice->joydev->has_ff)
624static unsigned short get_joystick_index(
REFGUID guid)
626 GUID wine_joystick = DInput_Wine_Joystick_Base_GUID;
629 wine_joystick.Data3 = 0;
636 if(
IsEqualGUID(&wine_joystick, &dev_guid))
return guid->Data3 - DInput_Wine_Joystick_Base_GUID.Data3;
643 unsigned short index;
649 if ((
index = get_joystick_index(rguid)) < MAX_JOYDEV &&
650 have_joydevs &&
index < have_joydevs)
672 WARN(
"no interface\n");
677 TRACE(
"Created a Joystick device (%p)\n",
This);
682 *pdev = &
This->generic.base.IDirectInputDevice8W_iface;
684 *pdev = &
This->generic.base.IDirectInputDevice8A_iface;
692static int joydev_open_evdev(JoystickImpl *
This)
705 WARN(
"Could not open %s in read-write mode. Force feedback will be disabled.\n",
This->joydev->device);
710 struct input_event
event;
713 event.code = FF_GAIN;
714 event.value =
This->ff_gain;
717 if (!
This->ff_autocenter)
720 event.code = FF_AUTOCENTER;
732 "Wine Linux-input joystick driver",
750 WARN(
"Failed to acquire: %x\n",
res);
754 if ((
This->joyfd = joydev_open_evdev(
This)) == -1)
761 This->joyfd_state = WINE_FD_STATE_OK;
782 struct input_event
event;
785 JoystickWImpl_SendForceFeedbackCommand(iface,
DISFFC_RESET);
789 event.code = FF_AUTOCENTER;
793 event.value = 0xFFFF;
799 This->joyfd_state = WINE_FD_STATE_CLOSED;
814#define CENTER_AXIS(a) \
815 (ji->dev_axes_to_di[a] == -1 ? 0 : joystick_map_axis( &ji->generic.props[ji->dev_axes_to_di[a]], \
816 ji->joydev->axes[a].value ))
817static void fake_current_js_state(JoystickImpl *ji)
822 ji->generic.js.lX = CENTER_AXIS(ABS_X);
823 ji->generic.js.lY = CENTER_AXIS(ABS_Y);
824 ji->generic.js.lZ = CENTER_AXIS(ABS_Z);
825 ji->generic.js.lRx = CENTER_AXIS(ABS_RX);
826 ji->generic.js.lRy = CENTER_AXIS(ABS_RY);
827 ji->generic.js.lRz = CENTER_AXIS(ABS_RZ);
828 ji->generic.js.rglSlider[0] = CENTER_AXIS(ABS_THROTTLE);
829 ji->generic.js.rglSlider[1] = CENTER_AXIS(ABS_RUDDER);
832 for (
i = 0;
i < 4;
i++)
833 ji->generic.js.rgdwPOV[
i] = -1;
841 struct input_event ie;
844 if (
This->joyfd == -1)
849 if (
This->joyfd_state != WINE_FD_STATE_DISCONNECTED)
852 fd = joydev_open_evdev(
This);
855 namebuf[
sizeof(namebuf) -
strlen(EVDEVDRIVER) - 1] = 0;
856 if (
ioctl(
fd, EVIOCGNAME(
sizeof(namebuf) -
strlen(EVDEVDRIVER) - 1), namebuf) == -1)
860 This->joyfd_state = WINE_FD_STATE_INVALID;
863 strcat(namebuf, EVDEVDRIVER);
866 ERR(
"Device %s changed from \"%s\" to \"%s\"! Can't reconnect.\n",
This->joydev->device,
This->joydev->name, namebuf);
867 This->joyfd_state = WINE_FD_STATE_INVALID;
872 This->joyfd_state = WINE_FD_STATE_OK;
873 TRACE(
"Reconnected to \"%s\" on %s",
This->joydev->name,
This->joydev->device);
888 plfd.fd =
This->joyfd;
899 This->joyfd_state = WINE_FD_STATE_DISCONNECTED;
913 This->joyfd_state = WINE_FD_STATE_DISCONNECTED;
918 TRACE(
"input_event: type %d, code %d, value %d\n",ie.type,ie.code,ie.value);
922 int btn =
This->buttons[ie.code];
924 TRACE(
"(%p) %d -> %d\n",
This, ie.code, btn);
928 btn =
This->generic.button_map[btn];
931 This->generic.js.rgbButtons[btn] =
value = ie.value ? 0x80 : 0x00;
937 int axis =
This->dev_axes_to_di[ie.code];
941 axis =
This->generic.axis_map[axis];
949 case 0:
This->generic.js.lX =
value;
break;
950 case 1:
This->generic.js.lY =
value;
break;
951 case 2:
This->generic.js.lZ =
value;
break;
952 case 3:
This->generic.js.lRx =
value;
break;
953 case 4:
This->generic.js.lRy =
value;
break;
954 case 5:
This->generic.js.lRz =
value;
break;
955 case 6:
This->generic.js.rglSlider[0] =
value;
break;
956 case 7:
This->generic.js.rglSlider[1] =
value;
break;
957 case 8:
case 9:
case 10:
case 11:
970 FIXME(
"unhandled joystick axis event (code %d, value %d)\n",ie.code,ie.value);
974#ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION
976 This->ff_state = ie.value;
990 TRACE(
"skipping event\n");
1007 WARN(
"invalid argument\n");
1012 TRACE(
"ph.dwSize = %d, ph.dwHeaderSize =%d, ph.dwObj = %d, ph.dwHow= %d\n",
1030 if (
This->generic.base.acquired) {
1032 struct input_event
event;
1035 event.code = FF_GAIN;
1036 event.value =
This->ff_gain;
1089 if (!
This->joydev->product_id || !
This->joydev->vendor_id)
1100 pd->
dwData = get_joystick_index(&
This->generic.base.guid);
1107 static const WCHAR formatW[] = {
'\\',
'\\',
'?',
'\\',
'h',
'i',
'd',
'#',
'v',
'i',
'd',
'_',
'%',
'0',
'4',
'x',
'&',
1108 'p',
'i',
'd',
'_',
'%',
'0',
'4',
'x',
'&',
'%',
's',
'_',
'%',
'h',
'u',0};
1109 static const WCHAR miW[] = {
'm',
'i',0};
1110 static const WCHAR igW[] = {
'i',
'g',0};
1114 WORD vid =
This->joydev->vendor_id;
1122 sprintfW(pd->
wszPath, formatW, vid,
pid, is_gamepad ? igW : miW, get_joystick_index(&
This->generic.base.guid));
1148#ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION
1154 TRACE(
"(this=%p,%p,%p,%p,%p)\n",
This, rguid, lpeff, ppdef, pUnkOuter);
1157 if (!
This->joydev->has_ff)
1159 TRACE(
"No force feedback support\n");
1163#ifndef HAVE_STRUCT_FF_EFFECT_DIRECTION
1164 TRACE(
"not available (compiled w/o force feedback support)\n");
1171 retval = linuxinput_create_effect(&
This->joyfd, rguid, &new_effect->
entry, &new_effect->
ref);
1172 if (retval !=
DI_OK)
1190 *ppdef = new_effect->
ref;
1192 if (pUnkOuter !=
NULL)
1193 FIXME(
"Interface aggregation not implemented.\n");
1216#ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION
1221 TRACE(
"(this=%p,%p,%d) type=%d\n",
This, pvRef, dwEffType,
type);
1228 (*lpCallback)(&dei, pvRef);
1235 (*lpCallback)(&dei, pvRef);
1239 (*lpCallback)(&dei, pvRef);
1243 (*lpCallback)(&dei, pvRef);
1247 (*lpCallback)(&dei, pvRef);
1251 (*lpCallback)(&dei, pvRef);
1258 (*lpCallback)(&dei, pvRef);
1264 (*lpCallback)(&dei, pvRef);
1268 (*lpCallback)(&dei, pvRef);
1272 (*lpCallback)(&dei, pvRef);
1276 (*lpCallback)(&dei, pvRef);
1290#ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION
1296 int xfd =
This->joyfd;
1298 TRACE(
"(this=%p,%p,%d) type=%d fd=%d\n",
This, pvRef, dwEffType,
type, xfd);
1305 (*lpCallback)(&dei, pvRef);
1312 (*lpCallback)(&dei, pvRef);
1316 (*lpCallback)(&dei, pvRef);
1320 (*lpCallback)(&dei, pvRef);
1324 (*lpCallback)(&dei, pvRef);
1328 (*lpCallback)(&dei, pvRef);
1335 (*lpCallback)(&dei, pvRef);
1341 (*lpCallback)(&dei, pvRef);
1345 (*lpCallback)(&dei, pvRef);
1349 (*lpCallback)(&dei, pvRef);
1353 (*lpCallback)(&dei, pvRef);
1376#ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION
1377 return linuxinput_get_info_A(
This->joyfd,
guid, pdei);
1391#ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION
1392 return linuxinput_get_info_W(
This->joyfd,
guid, pdei);
1409#ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION
1411 if (
This->ff_state == FF_STATUS_STOPPED)
1432#ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION
1459 FIXME(
"No support for Pause or Continue in linux\n");
1464 FIXME(
"No direct actuator control in linux\n");
1468 WARN(
"Unknown Force Feedback Command %u!\n",
dwFlags);
1501 FIXME(
"Flags specified, but no flags exist yet (DX9)!\n");
1504 (*lpCallback)(itr->
ref, pvRef);
1532 fill_joystick_dideviceinstanceA(pdidi,
This->generic.base.dinput->dwVersion,
1533 get_joystick_index(&
This->generic.base.guid));
1549 fill_joystick_dideviceinstanceW(pdidi,
This->generic.base.dinput->dwVersion,
1550 get_joystick_index(&
This->generic.base.guid));
1554static const IDirectInputDevice8AVtbl JoystickAvt =
1561 JoystickAImpl_GetProperty,
1562 JoystickAImpl_SetProperty,
1563 JoystickAImpl_Acquire,
1564 JoystickAImpl_Unacquire,
1571 JoystickAImpl_GetDeviceInfo,
1574 JoystickAImpl_CreateEffect,
1575 JoystickAImpl_EnumEffects,
1576 JoystickAImpl_GetEffectInfo,
1577 JoystickAImpl_GetForceFeedbackState,
1578 JoystickAImpl_SendForceFeedbackCommand,
1579 JoystickAImpl_EnumCreatedEffectObjects,
1590static const IDirectInputDevice8WVtbl JoystickWvt =
1597 JoystickWImpl_GetProperty,
1598 JoystickWImpl_SetProperty,
1599 JoystickWImpl_Acquire,
1600 JoystickWImpl_Unacquire,
1607 JoystickWImpl_GetDeviceInfo,
1610 JoystickWImpl_CreateEffect,
1611 JoystickWImpl_EnumEffects,
1612 JoystickWImpl_GetEffectInfo,
1613 JoystickWImpl_GetForceFeedbackState,
1614 JoystickWImpl_SendForceFeedbackCommand,
1615 JoystickWImpl_EnumCreatedEffectObjects,
1629 "Wine Linux-input joystick driver",
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
DWORD joystick_map_pov(const POINTL *p) DECLSPEC_HIDDEN
LONG joystick_map_axis(ObjProps *props, int val) DECLSPEC_HIDDEN
#define HeapFree(x, y, z)
#define MultiByteToWideChar
static const WCHAR version[]
GLuint GLuint GLsizei GLenum type
GLenum GLuint GLenum GLsizei const GLchar * buf
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 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
#define InterlockedCompareExchange
#define memcpy(s1, s2, n)
static int test_bit(int nr, volatile const unsigned long *addr)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
const char * strerror(int err)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
#define IsEqualGUID(rguid1, rguid2)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
CHAR tszInstanceName[MAX_PATH]
CHAR tszProductName[MAX_PATH]
WCHAR tszProductName[MAX_PATH]
WCHAR tszInstanceName[MAX_PATH]
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
#define CONTAINING_RECORD(address, type, field)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid