59{
64 union _infoex
65 {
68 } infoex;
70 UINT period[] = {0, 1, 9, 10, 100, 1000, 1001, 10000, 65535, 65536, 0xFFFFFFFF};
71 UINT threshold_error = 0x600, period_win8_error = 0x7CE;
75
77 joyid = -1;
78
80 {
81 memset(&jc, 0,
sizeof(jc));
84 {
85 if (joyid == -1)
87
88 trace(
"Joystick[%d] - name: '%s', axes: %d, buttons: %d, period range: %d - %d\n",
92 {
96 }
97 else win98++;
98 }
99 else
100 {
105 }
106 }
107
108
109
113
114 if (joyid == -1)
115 {
116 skip(
"This test requires a real joystick.\n");
117 return;
118 }
119
120
128 {
130 ok(
broken(1),
"Expected double capture using joySetCapture to work\n");
131 if (!win98 &&
broken(1)) win8++;
132 }
138
139
140
141
143 {
145 if (win8 && ((1 <<
i) & period_win8_error))
147 else
151
153 if (!win98 && (1 <<
i) & threshold_error)
155 else
157 par = 0xdead;
161 {
162 if ((1 <<
i) & threshold_error)
163 ok(par == period[8],
"Test [%d]: Expected %d, got %d\n",
i, period[8], par);
164 else
165 ok(par == period[
i],
"Test [%d]: Expected %d, got %d\n",
i, period[
i], par);
166 }
167 }
168
169
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);
191
192 infoex.ex.dwSize = sizeof(infoex.ex);
194 {
195 infoex.ex.dwFlags =
flags[
i];
198 }
199
200
201
203 {
204#define MAX_TIME 15000
206 infoex.ex.dwSize = sizeof(infoex.ex);
208 do
209 {
213 {
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);
220 }
222 }
224#undef MAX_TIME
225 }
226 else
227 skip(
"Skipping interactive tests for the joystick\n");
228}
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
CHAR szPname[MAXPNAMELEN]
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)