Commit fffcd23c authored by Alexandre Julliard's avatar Alexandre Julliard

dinput: Fix pointer cast warnings on 64-bit.

parent bc778b99
...@@ -876,7 +876,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty( ...@@ -876,7 +876,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
switch (LOWORD(rguid)) switch (LOWORD(rguid))
{ {
case (DWORD) DIPROP_BUFFERSIZE: case (DWORD_PTR) DIPROP_BUFFERSIZE:
{ {
LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
...@@ -910,7 +910,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty( ...@@ -910,7 +910,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty(
switch (LOWORD(rguid)) switch (LOWORD(rguid))
{ {
case (DWORD) DIPROP_AXISMODE: case (DWORD_PTR) DIPROP_AXISMODE:
{ {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)pdiph; LPCDIPROPDWORD pd = (LPCDIPROPDWORD)pdiph;
...@@ -930,7 +930,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty( ...@@ -930,7 +930,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty(
LeaveCriticalSection(&This->crit); LeaveCriticalSection(&This->crit);
break; break;
} }
case (DWORD) DIPROP_BUFFERSIZE: case (DWORD_PTR) DIPROP_BUFFERSIZE:
{ {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)pdiph; LPCDIPROPDWORD pd = (LPCDIPROPDWORD)pdiph;
......
...@@ -795,7 +795,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty( ...@@ -795,7 +795,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
if (!HIWORD(rguid)) { if (!HIWORD(rguid)) {
switch (LOWORD(rguid)) { switch (LOWORD(rguid)) {
case (DWORD)DIPROP_RANGE: { case (DWORD_PTR)DIPROP_RANGE: {
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph; LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
if (ph->dwHow == DIPH_DEVICE) { if (ph->dwHow == DIPH_DEVICE) {
TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax); TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax);
...@@ -815,7 +815,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty( ...@@ -815,7 +815,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
} }
break; break;
} }
case (DWORD)DIPROP_DEADZONE: { case (DWORD_PTR)DIPROP_DEADZONE: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
if (ph->dwHow == DIPH_DEVICE) { if (ph->dwHow == DIPH_DEVICE) {
TRACE("deadzone(%d) all\n", pd->dwData); TRACE("deadzone(%d) all\n", pd->dwData);
...@@ -832,7 +832,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty( ...@@ -832,7 +832,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
} }
break; break;
} }
case (DWORD)DIPROP_SATURATION: { case (DWORD_PTR)DIPROP_SATURATION: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
if (ph->dwHow == DIPH_DEVICE) { if (ph->dwHow == DIPH_DEVICE) {
TRACE("saturation(%d) all\n", pd->dwData); TRACE("saturation(%d) all\n", pd->dwData);
...@@ -919,7 +919,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty( ...@@ -919,7 +919,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(
if (!HIWORD(rguid)) { if (!HIWORD(rguid)) {
switch (LOWORD(rguid)) { switch (LOWORD(rguid)) {
case (DWORD) DIPROP_RANGE: { case (DWORD_PTR) DIPROP_RANGE: {
LPDIPROPRANGE pr = (LPDIPROPRANGE)pdiph; LPDIPROPRANGE pr = (LPDIPROPRANGE)pdiph;
int obj = find_property(&This->base.data_format, pdiph); int obj = find_property(&This->base.data_format, pdiph);
...@@ -933,7 +933,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty( ...@@ -933,7 +933,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(
} }
break; break;
} }
case (DWORD) DIPROP_DEADZONE: { case (DWORD_PTR) DIPROP_DEADZONE: {
LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
int obj = find_property(&This->base.data_format, pdiph); int obj = find_property(&This->base.data_format, pdiph);
...@@ -944,7 +944,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty( ...@@ -944,7 +944,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(
} }
break; break;
} }
case (DWORD) DIPROP_SATURATION: { case (DWORD_PTR) DIPROP_SATURATION: {
LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
int obj = find_property(&This->base.data_format, pdiph); int obj = find_property(&This->base.data_format, pdiph);
......
...@@ -852,7 +852,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, ...@@ -852,7 +852,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
if (!HIWORD(rguid)) { if (!HIWORD(rguid)) {
switch (LOWORD(rguid)) { switch (LOWORD(rguid)) {
case (DWORD)DIPROP_RANGE: { case (DWORD_PTR)DIPROP_RANGE: {
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph; LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
if (ph->dwHow == DIPH_DEVICE) { if (ph->dwHow == DIPH_DEVICE) {
...@@ -880,7 +880,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, ...@@ -880,7 +880,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
fake_current_js_state(This); fake_current_js_state(This);
break; break;
} }
case (DWORD)DIPROP_DEADZONE: { case (DWORD_PTR)DIPROP_DEADZONE: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
if (ph->dwHow == DIPH_DEVICE) { if (ph->dwHow == DIPH_DEVICE) {
DWORD i; DWORD i;
...@@ -899,18 +899,18 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, ...@@ -899,18 +899,18 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
fake_current_js_state(This); fake_current_js_state(This);
break; break;
} }
case (DWORD)DIPROP_CALIBRATIONMODE: { case (DWORD_PTR)DIPROP_CALIBRATIONMODE: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
FIXME("DIPROP_CALIBRATIONMODE(%d)\n", pd->dwData); FIXME("DIPROP_CALIBRATIONMODE(%d)\n", pd->dwData);
break; break;
} }
case (DWORD)DIPROP_AUTOCENTER: { case (DWORD_PTR)DIPROP_AUTOCENTER: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
FIXME("DIPROP_AUTOCENTER(%d)\n", pd->dwData); FIXME("DIPROP_AUTOCENTER(%d)\n", pd->dwData);
break; break;
} }
case (DWORD)DIPROP_SATURATION: { case (DWORD_PTR)DIPROP_SATURATION: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph; LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
if (ph->dwHow == DIPH_DEVICE) { if (ph->dwHow == DIPH_DEVICE) {
...@@ -999,7 +999,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, ...@@ -999,7 +999,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
if (HIWORD(rguid)) return DI_OK; if (HIWORD(rguid)) return DI_OK;
switch (LOWORD(rguid)) { switch (LOWORD(rguid)) {
case (DWORD) DIPROP_RANGE: case (DWORD_PTR) DIPROP_RANGE:
{ {
LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph; LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph;
int obj = find_property(&This->base.data_format, pdiph); int obj = find_property(&This->base.data_format, pdiph);
...@@ -1011,7 +1011,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, ...@@ -1011,7 +1011,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
TRACE("range(%d, %d) obj=%d\n", pr->lMin, pr->lMax, obj); TRACE("range(%d, %d) obj=%d\n", pr->lMin, pr->lMax, obj);
break; break;
} }
case (DWORD) DIPROP_DEADZONE: case (DWORD_PTR) DIPROP_DEADZONE:
{ {
LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
int obj = find_property(&This->base.data_format, pdiph); int obj = find_property(&This->base.data_format, pdiph);
...@@ -1022,7 +1022,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, ...@@ -1022,7 +1022,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj); TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj);
break; break;
} }
case (DWORD) DIPROP_SATURATION: case (DWORD_PTR) DIPROP_SATURATION:
{ {
LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph; LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
int obj = find_property(&This->base.data_format, pdiph); int obj = find_property(&This->base.data_format, pdiph);
......
...@@ -443,7 +443,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, ...@@ -443,7 +443,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
switch (LOWORD(rguid)) switch (LOWORD(rguid))
{ {
case (DWORD)DIPROP_KEYNAME: case (DWORD_PTR)DIPROP_KEYNAME:
{ {
HRESULT hr; HRESULT hr;
LPDIPROPSTRING ps = (LPDIPROPSTRING)pdiph; LPDIPROPSTRING ps = (LPDIPROPSTRING)pdiph;
......
...@@ -585,7 +585,7 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, ...@@ -585,7 +585,7 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
if (!HIWORD(rguid)) { if (!HIWORD(rguid)) {
switch (LOWORD(rguid)) { switch (LOWORD(rguid)) {
case (DWORD) DIPROP_GRANULARITY: { case (DWORD_PTR) DIPROP_GRANULARITY: {
LPDIPROPDWORD pr = (LPDIPROPDWORD) pdiph; LPDIPROPDWORD pr = (LPDIPROPDWORD) pdiph;
/* We'll just assume that the app asks about the Z axis */ /* We'll just assume that the app asks about the Z axis */
...@@ -594,7 +594,7 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, ...@@ -594,7 +594,7 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
break; break;
} }
case (DWORD) DIPROP_RANGE: { case (DWORD_PTR) DIPROP_RANGE: {
LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph; LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph;
if ((pdiph->dwHow == DIPH_BYID) && if ((pdiph->dwHow == DIPH_BYID) &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment