Zhiyi Zhang : setupapi: Return CR_SUCCESS for CM_Get_DevNode_Status{_Ex}.
Module: wine Branch: master Commit: f9d838423d3aa2f5f97af172514ea4493cd1e0cf URL: https://source.winehq.org/git/wine.git/?a=commit;h=f9d838423d3aa2f5f97af1725... Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Mar 30 14:57:35 2022 +0800 setupapi: Return CR_SUCCESS for CM_Get_DevNode_Status{_Ex}. One Piece: Pirate Warriors 4 relies on CM_Get_DevNode_Status() to return CR_SUCCESS. Otherwise, it shows a graphics driver error dialog and exits. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/stubs.c | 5 ++--- include/cfgmgr32.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c index 4b1585c8df6..75185de047c 100644 --- a/dlls/setupapi/stubs.c +++ b/dlls/setupapi/stubs.c @@ -455,8 +455,7 @@ CONFIGRET WINAPI CM_Get_DevNode_Registry_PropertyW(DEVINST dev, ULONG prop, PULO CONFIGRET WINAPI CM_Get_DevNode_Status(ULONG *status, ULONG *problem, DEVINST dev, ULONG flags) { - FIXME("%p %p 0x%08lx 0x%08lx: stub\n", status, problem, dev, flags); - return CR_FAILURE; + return CM_Get_DevNode_Status_Ex(status, problem, dev, flags, NULL); } /*********************************************************************** @@ -466,7 +465,7 @@ CONFIGRET WINAPI CM_Get_DevNode_Status_Ex(ULONG *status, ULONG *problem, DEVINST ULONG flags, HMACHINE machine) { FIXME("%p %p 0x%08lx 0x%08lx %p: stub\n", status, problem, dev, flags, machine); - return CR_FAILURE; + return CR_SUCCESS; } /*********************************************************************** diff --git a/include/cfgmgr32.h b/include/cfgmgr32.h index 7c4f4714126..d300c4babaa 100644 --- a/include/cfgmgr32.h +++ b/include/cfgmgr32.h @@ -234,6 +234,8 @@ CMAPI CONFIGRET WINAPI CM_Get_Device_ID_List_ExW(PCWSTR,PWCHAR,ULONG,ULONG,HMACH #define CM_Get_Device_ID_List_Ex WINELIB_NAME_AW(CM_Get_Device_ID_List_Ex) CMAPI CONFIGRET WINAPI CM_Get_Device_ID_Size(PULONG,DEVINST,ULONG); CMAPI CONFIGRET WINAPI CM_Get_Device_ID_Size_Ex(PULONG,DEVINST,ULONG,HMACHINE); +CMAPI CONFIGRET WINAPI CM_Get_DevNode_Status(PULONG,PULONG,DEVINST,ULONG); +CMAPI CONFIGRET WINAPI CM_Get_DevNode_Status_Ex(PULONG,PULONG,DEVINST,ULONG,HMACHINE); CMAPI CONFIGRET WINAPI CM_Get_Sibling(PDEVINST,DEVINST,ULONG); CMAPI CONFIGRET WINAPI CM_Get_Sibling_Ex(PDEVINST pdnDevInst, DEVINST DevInst, ULONG ulFlags, HMACHINE hMachine); CMAPI WORD WINAPI CM_Get_Version(void);
participants (1)
-
Alexandre Julliard