Commit 2004db1b authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dinput: Don't use HIWORD to check if a REFGUID is a DIPROP.

parent e9776726
......@@ -872,7 +872,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
TRACE("(%p) %s,%p\n", iface, debugstr_guid(rguid), pdiph);
_dump_DIPROPHEADER(pdiph);
if (HIWORD(rguid)) return DI_OK;
if (!IS_DIPROP(rguid)) return DI_OK;
switch (LOWORD(rguid))
{
......@@ -906,7 +906,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty(
TRACE("(%p) %s,%p\n", iface, debugstr_guid(rguid), pdiph);
_dump_DIPROPHEADER(pdiph);
if (HIWORD(rguid)) return DI_OK;
if (!IS_DIPROP(rguid)) return DI_OK;
switch (LOWORD(rguid))
{
......
......@@ -65,4 +65,6 @@ typedef int (*DI_EVENT_PROC)(LPDIRECTINPUTDEVICE8A, WPARAM, LPARAM);
extern void _dump_diactionformatA(LPDIACTIONFORMATA);
#define IS_DIPROP(x) (((ULONG_PTR)(x) >> 16) == 0)
#endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */
......@@ -53,7 +53,7 @@ HRESULT WINAPI JoystickAGenericImpl_SetProperty(
if (TRACE_ON(dinput))
_dump_DIPROPHEADER(ph);
if (!HIWORD(rguid)) {
if (IS_DIPROP(rguid)) {
switch (LOWORD(rguid)) {
case (DWORD_PTR)DIPROP_RANGE: {
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
......@@ -230,7 +230,7 @@ HRESULT WINAPI JoystickAGenericImpl_GetProperty(
if (TRACE_ON(dinput))
_dump_DIPROPHEADER(pdiph);
if (!HIWORD(rguid)) {
if (IS_DIPROP(rguid)) {
switch (LOWORD(rguid)) {
case (DWORD_PTR) DIPROP_RANGE: {
LPDIPROPRANGE pr = (LPDIPROPRANGE)pdiph;
......
......@@ -847,7 +847,7 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
TRACE("ph.dwSize = %d, ph.dwHeaderSize =%d, ph.dwObj = %d, ph.dwHow= %d\n",
ph->dwSize, ph->dwHeaderSize, ph->dwObj, ph->dwHow);
if (!HIWORD(rguid)) {
if (IS_DIPROP(rguid)) {
switch (LOWORD(rguid)) {
case (DWORD_PTR)DIPROP_CALIBRATIONMODE: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
......@@ -898,7 +898,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
TRACE("(this=%p,%s,%p)\n", iface, debugstr_guid(rguid), pdiph);
_dump_DIPROPHEADER(pdiph);
if (HIWORD(rguid)) return DI_OK;
if (!IS_DIPROP(rguid)) return DI_OK;
switch (LOWORD(rguid)) {
case (DWORD_PTR) DIPROP_AUTOCENTER:
......
......@@ -447,7 +447,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
TRACE("(%p) %s,%p\n", iface, debugstr_guid(rguid), pdiph);
_dump_DIPROPHEADER(pdiph);
if (HIWORD(rguid)) return DI_OK;
if (!IS_DIPROP(rguid)) return DI_OK;
switch (LOWORD(rguid))
{
......
......@@ -587,7 +587,7 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
TRACE("(%p) %s,%p\n", This, debugstr_guid(rguid), pdiph);
_dump_DIPROPHEADER(pdiph);
if (!HIWORD(rguid)) {
if (IS_DIPROP(rguid)) {
switch (LOWORD(rguid)) {
case (DWORD_PTR) DIPROP_GRANULARITY: {
LPDIPROPDWORD pr = (LPDIPROPDWORD) pdiph;
......
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