dinput: Don't use HIWORD to check if a REFGUID is a DIPROP.
This commit is contained in:
parent
e977672661
commit
2004db1bb1
|
@ -872,7 +872,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_GetProperty(
|
||||||
TRACE("(%p) %s,%p\n", iface, debugstr_guid(rguid), pdiph);
|
TRACE("(%p) %s,%p\n", iface, debugstr_guid(rguid), pdiph);
|
||||||
_dump_DIPROPHEADER(pdiph);
|
_dump_DIPROPHEADER(pdiph);
|
||||||
|
|
||||||
if (HIWORD(rguid)) return DI_OK;
|
if (!IS_DIPROP(rguid)) return DI_OK;
|
||||||
|
|
||||||
switch (LOWORD(rguid))
|
switch (LOWORD(rguid))
|
||||||
{
|
{
|
||||||
|
@ -906,7 +906,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty(
|
||||||
TRACE("(%p) %s,%p\n", iface, debugstr_guid(rguid), pdiph);
|
TRACE("(%p) %s,%p\n", iface, debugstr_guid(rguid), pdiph);
|
||||||
_dump_DIPROPHEADER(pdiph);
|
_dump_DIPROPHEADER(pdiph);
|
||||||
|
|
||||||
if (HIWORD(rguid)) return DI_OK;
|
if (!IS_DIPROP(rguid)) return DI_OK;
|
||||||
|
|
||||||
switch (LOWORD(rguid))
|
switch (LOWORD(rguid))
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,4 +65,6 @@ typedef int (*DI_EVENT_PROC)(LPDIRECTINPUTDEVICE8A, WPARAM, LPARAM);
|
||||||
|
|
||||||
extern void _dump_diactionformatA(LPDIACTIONFORMATA);
|
extern void _dump_diactionformatA(LPDIACTIONFORMATA);
|
||||||
|
|
||||||
|
#define IS_DIPROP(x) (((ULONG_PTR)(x) >> 16) == 0)
|
||||||
|
|
||||||
#endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */
|
#endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */
|
||||||
|
|
|
@ -53,7 +53,7 @@ HRESULT WINAPI JoystickAGenericImpl_SetProperty(
|
||||||
if (TRACE_ON(dinput))
|
if (TRACE_ON(dinput))
|
||||||
_dump_DIPROPHEADER(ph);
|
_dump_DIPROPHEADER(ph);
|
||||||
|
|
||||||
if (!HIWORD(rguid)) {
|
if (IS_DIPROP(rguid)) {
|
||||||
switch (LOWORD(rguid)) {
|
switch (LOWORD(rguid)) {
|
||||||
case (DWORD_PTR)DIPROP_RANGE: {
|
case (DWORD_PTR)DIPROP_RANGE: {
|
||||||
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
|
LPCDIPROPRANGE pr = (LPCDIPROPRANGE)ph;
|
||||||
|
@ -230,7 +230,7 @@ HRESULT WINAPI JoystickAGenericImpl_GetProperty(
|
||||||
if (TRACE_ON(dinput))
|
if (TRACE_ON(dinput))
|
||||||
_dump_DIPROPHEADER(pdiph);
|
_dump_DIPROPHEADER(pdiph);
|
||||||
|
|
||||||
if (!HIWORD(rguid)) {
|
if (IS_DIPROP(rguid)) {
|
||||||
switch (LOWORD(rguid)) {
|
switch (LOWORD(rguid)) {
|
||||||
case (DWORD_PTR) DIPROP_RANGE: {
|
case (DWORD_PTR) DIPROP_RANGE: {
|
||||||
LPDIPROPRANGE pr = (LPDIPROPRANGE)pdiph;
|
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",
|
TRACE("ph.dwSize = %d, ph.dwHeaderSize =%d, ph.dwObj = %d, ph.dwHow= %d\n",
|
||||||
ph->dwSize, ph->dwHeaderSize, ph->dwObj, ph->dwHow);
|
ph->dwSize, ph->dwHeaderSize, ph->dwObj, ph->dwHow);
|
||||||
|
|
||||||
if (!HIWORD(rguid)) {
|
if (IS_DIPROP(rguid)) {
|
||||||
switch (LOWORD(rguid)) {
|
switch (LOWORD(rguid)) {
|
||||||
case (DWORD_PTR)DIPROP_CALIBRATIONMODE: {
|
case (DWORD_PTR)DIPROP_CALIBRATIONMODE: {
|
||||||
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
|
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);
|
TRACE("(this=%p,%s,%p)\n", iface, debugstr_guid(rguid), pdiph);
|
||||||
_dump_DIPROPHEADER(pdiph);
|
_dump_DIPROPHEADER(pdiph);
|
||||||
|
|
||||||
if (HIWORD(rguid)) return DI_OK;
|
if (!IS_DIPROP(rguid)) return DI_OK;
|
||||||
|
|
||||||
switch (LOWORD(rguid)) {
|
switch (LOWORD(rguid)) {
|
||||||
case (DWORD_PTR) DIPROP_AUTOCENTER:
|
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);
|
TRACE("(%p) %s,%p\n", iface, debugstr_guid(rguid), pdiph);
|
||||||
_dump_DIPROPHEADER(pdiph);
|
_dump_DIPROPHEADER(pdiph);
|
||||||
|
|
||||||
if (HIWORD(rguid)) return DI_OK;
|
if (!IS_DIPROP(rguid)) return DI_OK;
|
||||||
|
|
||||||
switch (LOWORD(rguid))
|
switch (LOWORD(rguid))
|
||||||
{
|
{
|
||||||
|
|
|
@ -587,7 +587,7 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
|
||||||
TRACE("(%p) %s,%p\n", This, debugstr_guid(rguid), pdiph);
|
TRACE("(%p) %s,%p\n", This, debugstr_guid(rguid), pdiph);
|
||||||
_dump_DIPROPHEADER(pdiph);
|
_dump_DIPROPHEADER(pdiph);
|
||||||
|
|
||||||
if (!HIWORD(rguid)) {
|
if (IS_DIPROP(rguid)) {
|
||||||
switch (LOWORD(rguid)) {
|
switch (LOWORD(rguid)) {
|
||||||
case (DWORD_PTR) DIPROP_GRANULARITY: {
|
case (DWORD_PTR) DIPROP_GRANULARITY: {
|
||||||
LPDIPROPDWORD pr = (LPDIPROPDWORD) pdiph;
|
LPDIPROPDWORD pr = (LPDIPROPDWORD) pdiph;
|
||||||
|
|
Loading…
Reference in New Issue