38 const char name[] =
"Joystick Test";
41 memset(&wc, 0,
sizeof(wc));
70 UINT period[] = {0, 1, 9, 10, 100, 1000, 1001, 10000, 65535, 65536, 0xFFFFFFFF};
71 UINT threshold_error = 0x600, period_win8_error = 0x7CE;
81 memset(&jc, 0,
sizeof(jc));
88 trace(
"Joystick[%d] - name: '%s', axes: %d, buttons: %d, period range: %d - %d\n",
116 skip(
"This test requires a real joystick.\n");
130 ok(
broken(1),
"Expected double capture using joySetCapture to work\n");
131 if (!win98 &&
broken(1)) win8++;
145 if (win8 && ((1 <<
i) & period_win8_error))
153 if (!win98 && (1 <<
i) & threshold_error)
162 if ((1 <<
i) & threshold_error)
163 ok(par == period[8],
"Test [%d]: Expected %d, got %d\n",
i, period[8], par);
165 ok(par == period[
i],
"Test [%d]: Expected %d, got %d\n",
i, period[
i], par);
177 memset(&infoex, 0,
sizeof(infoex));
181 infoex.ex.dwSize =
sizeof(infoex.ex);
184 infoex.ex.dwSize =
sizeof(infoex.ex) - 1;
188 infoex.ex.dwSize =
sizeof(infoex);
192 infoex.ex.dwSize =
sizeof(infoex.ex);
195 infoex.ex.dwFlags =
flags[
i];
204#define MAX_TIME 15000
206 infoex.ex.dwSize =
sizeof(infoex.ex);
214 trace(
"X: %5d, Y: %5d, Z: %5d, POV: %5d\n",
215 infoex.ex.dwXpos, infoex.ex.dwYpos, infoex.ex.dwZpos, infoex.ex.dwPOV);
216 trace(
"R: %5d, U: %5d, V: %5d\n",
217 infoex.ex.dwRpos, infoex.ex.dwUpos, infoex.ex.dwVpos);
218 trace(
"BUTTONS: 0x%04X, BUTTON_COUNT: %2d, REMAINING: %d ms\n\n",
219 infoex.ex.dwButtons, infoex.ex.dwButtonNumber,
MAX_TIME - spent);
227 skip(
"Skipping interactive tests for the joystick\n");
DWORD WINAPI GetTickCount(VOID)
MMRESULT WINAPI joyGetThreshold(UINT wID, LPUINT lpThreshold)
MMRESULT WINAPI DECLSPEC_HOTPATCH joyGetPosEx(UINT wID, LPJOYINFOEX lpInfo)
MMRESULT WINAPI joyGetPos(UINT wID, LPJOYINFO lpInfo)
MMRESULT WINAPI DECLSPEC_HOTPATCH joyGetDevCapsA(UINT_PTR wID, LPJOYCAPSA lpCaps, UINT wSize)
MMRESULT WINAPI joySetCapture(HWND hWnd, UINT wID, UINT wPeriod, BOOL bChanged)
UINT WINAPI DECLSPEC_HOTPATCH joyGetNumDevs(void)
MMRESULT WINAPI joySetThreshold(UINT wID, UINT wThreshold)
MMRESULT WINAPI DECLSPEC_HOTPATCH joyGetDevCapsW(UINT_PTR wID, LPJOYCAPSW lpCaps, UINT wSize)
MMRESULT WINAPI joyReleaseCapture(UINT wID)
static struct all_devices * devices
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 JOY_RETURNRAWDATA
#define MMSYSERR_NOTSUPPORTED
#define MMSYSERR_NODRIVER
struct joyinfoex_tag JOYINFOEX
#define MMSYSERR_INVALPARAM
#define JOY_RETURNBUTTONS
#define JOY_RETURNCENTERED
static void destroy_window(void)
static void test_api(void)
static LRESULT CALLBACK proc_window(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void create_window(void)
#define WS_OVERLAPPEDWINDOW
CHAR szPname[MAXPNAMELEN]
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
DWORD WINAPI GetLastError(void)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
BOOL WINAPI DestroyWindow(_In_ HWND)