From 250242f66a67a34b4786c11a82ea1385f6c564e0 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Fri, 2 Feb 2024 15:11:46 -0600 Subject: [PATCH] vrclient: Return STATUS_SUCCESS from vrclient_init() on initialization failures. Initialization status is returned in parameters, returning non-zero NTSTATUS causes unneeded assertion failure. CW-Bug-Id: #23354 --- vrclient_x64/unixlib.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vrclient_x64/unixlib.cpp b/vrclient_x64/unixlib.cpp index 41e6d203..71cb5fb2 100644 --- a/vrclient_x64/unixlib.cpp +++ b/vrclient_x64/unixlib.cpp @@ -77,6 +77,8 @@ NTSTATUS vrclient_init( void *args ) struct vrclient_init_params *params = (struct vrclient_init_params *)args; static void *vrclient; + params->_ret = false; + if (vrclient) { params->_ret = true; @@ -86,14 +88,14 @@ NTSTATUS vrclient_init( void *args ) if (!(vrclient = dlopen( params->unix_path, RTLD_NOW ))) { TRACE( "unable to load %s\n", params->unix_path ); - return -1; + return 0; } #define LOAD_FUNC( x ) \ if (!(p_##x = (decltype(p_##x))dlsym( vrclient, #x ))) \ { \ ERR( "unable to load " #x "\n" ); \ - return -1; \ + return 0; \ } LOAD_FUNC( HmdSystemFactory ); @@ -102,7 +104,7 @@ NTSTATUS vrclient_init( void *args ) #undef LOAD_FUNC if (!load_vk_unwrappers( params->winevulkan )) - return -1; + return 0; params->_ret = true; return 0;