dinput: Fix pointer cast warnings on 64-bit.

This commit is contained in:
Alexandre Julliard 2009-01-05 12:39:44 +01:00
parent bc778b99f9
commit fffcd23cce
5 changed files with 20 additions and 20 deletions

View File

@ -876,7 +876,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
switch (LOWORD(rguid))
{
case (DWORD) DIPROP_BUFFERSIZE:
case (DWORD_PTR) DIPROP_BUFFERSIZE:
{
LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
@ -910,7 +910,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty(
switch (LOWORD(rguid))
{
case (DWORD) DIPROP_AXISMODE:
case (DWORD_PTR) DIPROP_AXISMODE:
{
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)pdiph;
@ -930,7 +930,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty(
LeaveCriticalSection(&This->crit);
break;
}
case (DWORD) DIPROP_BUFFERSIZE:
case (DWORD_PTR) DIPROP_BUFFERSIZE:
{
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)pdiph;

View File

@ -795,7 +795,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
if (!HIWORD(rguid)) {
switch (LOWORD(rguid)) {
case (DWORD)DIPROP_RANGE: {
case (DWORD_PTR)DIPROP_RANGE: {
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
if (ph->dwHow == DIPH_DEVICE) {
TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax);
@ -815,7 +815,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
}
break;
}
case (DWORD)DIPROP_DEADZONE: {
case (DWORD_PTR)DIPROP_DEADZONE: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
if (ph->dwHow == DIPH_DEVICE) {
TRACE("deadzone(%d) all\n", pd->dwData);
@ -832,7 +832,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
}
break;
}
case (DWORD)DIPROP_SATURATION: {
case (DWORD_PTR)DIPROP_SATURATION: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
if (ph->dwHow == DIPH_DEVICE) {
TRACE("saturation(%d) all\n", pd->dwData);
@ -919,7 +919,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(
if (!HIWORD(rguid)) {
switch (LOWORD(rguid)) {
case (DWORD) DIPROP_RANGE: {
case (DWORD_PTR) DIPROP_RANGE: {
LPDIPROPRANGE pr = (LPDIPROPRANGE)pdiph;
int obj = find_property(&This->base.data_format, pdiph);
@ -933,7 +933,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(
}
break;
}
case (DWORD) DIPROP_DEADZONE: {
case (DWORD_PTR) DIPROP_DEADZONE: {
LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
int obj = find_property(&This->base.data_format, pdiph);
@ -944,7 +944,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(
}
break;
}
case (DWORD) DIPROP_SATURATION: {
case (DWORD_PTR) DIPROP_SATURATION: {
LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
int obj = find_property(&This->base.data_format, pdiph);

View File

@ -852,7 +852,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
if (!HIWORD(rguid)) {
switch (LOWORD(rguid)) {
case (DWORD)DIPROP_RANGE: {
case (DWORD_PTR)DIPROP_RANGE: {
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
if (ph->dwHow == DIPH_DEVICE) {
@ -880,7 +880,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
fake_current_js_state(This);
break;
}
case (DWORD)DIPROP_DEADZONE: {
case (DWORD_PTR)DIPROP_DEADZONE: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
if (ph->dwHow == DIPH_DEVICE) {
DWORD i;
@ -899,18 +899,18 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
fake_current_js_state(This);
break;
}
case (DWORD)DIPROP_CALIBRATIONMODE: {
case (DWORD_PTR)DIPROP_CALIBRATIONMODE: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
FIXME("DIPROP_CALIBRATIONMODE(%d)\n", pd->dwData);
break;
}
case (DWORD)DIPROP_AUTOCENTER: {
case (DWORD_PTR)DIPROP_AUTOCENTER: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
FIXME("DIPROP_AUTOCENTER(%d)\n", pd->dwData);
break;
}
case (DWORD)DIPROP_SATURATION: {
case (DWORD_PTR)DIPROP_SATURATION: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
if (ph->dwHow == DIPH_DEVICE) {
@ -999,7 +999,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
if (HIWORD(rguid)) return DI_OK;
switch (LOWORD(rguid)) {
case (DWORD) DIPROP_RANGE:
case (DWORD_PTR) DIPROP_RANGE:
{
LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph;
int obj = find_property(&This->base.data_format, pdiph);
@ -1011,7 +1011,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
TRACE("range(%d, %d) obj=%d\n", pr->lMin, pr->lMax, obj);
break;
}
case (DWORD) DIPROP_DEADZONE:
case (DWORD_PTR) DIPROP_DEADZONE:
{
LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
int obj = find_property(&This->base.data_format, pdiph);
@ -1022,7 +1022,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj);
break;
}
case (DWORD) DIPROP_SATURATION:
case (DWORD_PTR) DIPROP_SATURATION:
{
LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
int obj = find_property(&This->base.data_format, pdiph);

View File

@ -443,7 +443,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
switch (LOWORD(rguid))
{
case (DWORD)DIPROP_KEYNAME:
case (DWORD_PTR)DIPROP_KEYNAME:
{
HRESULT hr;
LPDIPROPSTRING ps = (LPDIPROPSTRING)pdiph;

View File

@ -585,7 +585,7 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
if (!HIWORD(rguid)) {
switch (LOWORD(rguid)) {
case (DWORD) DIPROP_GRANULARITY: {
case (DWORD_PTR) DIPROP_GRANULARITY: {
LPDIPROPDWORD pr = (LPDIPROPDWORD) pdiph;
/* We'll just assume that the app asks about the Z axis */
@ -594,7 +594,7 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
break;
}
case (DWORD) DIPROP_RANGE: {
case (DWORD_PTR) DIPROP_RANGE: {
LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph;
if ((pdiph->dwHow == DIPH_BYID) &&