37#include "wine/unicode.h"
41#define WINE_DINPUT_KEYBOARD_MAX_KEYS 256
64 return &
This->base.IDirectInputDevice8A_iface;
68 return &
This->base.IDirectInputDevice8W_iface;
117 TRACE(
"(%p) wp %08lx, lp %08lx, vk %02x, scan %02x\n",
120 switch (
hook->vkCode)
134 if (new_diks ==
This->DInputKeyState[dik_code])
137 This->DInputKeyState[dik_code] = new_diks;
138 TRACE(
" setting %02X to %02X\n", dik_code,
This->DInputKeyState[dik_code]);
150 DWORD kbd_type, kbd_subtype, dev_subtype;
154 if (kbd_type == 4 || (kbd_type == 7 && kbd_subtype == 0))
156 else if (kbd_type == 7 && kbd_subtype == 2)
159 FIXME(
"Unknown keyboard type=%u, subtype=%u\n", kbd_type, kbd_subtype);
174 memset(&ddi, 0,
sizeof(ddi));
198 memset(&ddi, 0,
sizeof(ddi));
221 if ((dwDevType == 0) ||
224 TRACE(
"Enumerating the Keyboard device\n");
242 if ((dwDevType == 0) ||
245 TRACE(
"Enumerating the Keyboard device\n");
264 newDevice->
base.ref = 1;
265 memcpy(&newDevice->
base.guid, rguid,
sizeof(*rguid));
269 newDevice->
base.crit.DebugInfo->Spare[0] = (
DWORD_PTR)(__FILE__
": SysKeyboardImpl*->base.crit");
291 newDevice->
base.data_format.wine_df = df;
335 WARN(
"no interface\n");
340 TRACE(
"Created a Keyboard device (%p)\n",
This);
345 *pdev = &
This->base.IDirectInputDevice8W_iface;
347 *pdev = &
This->base.IDirectInputDevice8A_iface;
356 "Wine keyboard driver",
369 if (
len !=
This->base.data_format.user_df->dwDataSize )
379 if (
This->DInputKeyState[
i] != 0x00)
380 TRACE(
" - %02X: %02x\n",
i,
This->DInputKeyState[
i]);
404 TRACE(
"(this=%p,%p)\n",
This,lpDIDevCaps);
407 WARN(
"invalid parameter\n");
413 if (
This->base.dinput->dwVersion >= 0x0800)
418 devcaps.
dwButtons =
This->base.data_format.wine_df->dwNumObjs;
540 WARN(
" dinput3 not supported yet...\n");
605 TRACE(
"clearing keystate\n");
643 if (lpszUserName !=
NULL)
684 if (lpszUserName !=
NULL)
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)
void _copy_diactionformatWtoA(LPDIACTIONFORMATA to, LPDIACTIONFORMATW from)
void check_dinput_events(void)
void _copy_diactionformatAtoW(LPDIACTIONFORMATW to, LPDIACTIONFORMATA from)
#define HeapFree(x, y, z)
#define MultiByteToWideChar
static const WCHAR version[]
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
#define memcpy(s1, s2, n)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define IsEqualGUID(rguid1, rguid2)
DWORD dwFFMinTimeResolution
CHAR tszInstanceName[MAX_PATH]
CHAR tszProductName[MAX_PATH]
WCHAR tszProductName[MAX_PATH]
WCHAR tszInstanceName[MAX_PATH]
struct IDirectInputDeviceImpl base
BYTE DInputKeyState[WINE_DINPUT_KEYBOARD_MAX_KEYS]
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
int WINAPI GetKeyNameTextA(_In_ LONG lParam, _Out_writes_(cchSize) LPSTR lpString, _In_ int cchSize)
UINT WINAPI MapVirtualKeyW(_In_ UINT, _In_ UINT)
int WINAPI GetKeyNameTextW(_In_ LONG lParam, _Out_writes_(cchSize) LPWSTR lpString, _In_ int cchSize)
int WINAPI GetKeyboardType(_In_ int)