Will call connect_to_hid_hdrhere, which does this:
let mut handle = 0u32;
let result = unsafe { get_service_handle(&mut handle, b"hid:hdr\0".as_ptr(), 7) };
get_service_handle calls the GetServiceHandle interface method on sm:, which blocks until the service is available. This seems to not be intended, because the hid-hdr module exports a function named does_hid_hdr_exist that correctly checks if the service is available.
I'm not sure if the ideal refactoring here is to check for service availability in setup_hid_hdr in this repository, or get_hid_hdr_status in the hid-hdr repository.
This code: https://github.com/HDR-Development/HewDraw-Remix/blob/7f5de9a768fefe4a885433599ef6f65dd36f629e/plugin/src/lib.rs#L442-L447
Will call
connect_to_hid_hdr
here, which does this:get_service_handle
calls the GetServiceHandle interface method on sm:, which blocks until the service is available. This seems to not be intended, because the hid-hdr module exports a function nameddoes_hid_hdr_exist
that correctly checks if the service is available.I'm not sure if the ideal refactoring here is to check for service availability in
setup_hid_hdr
in this repository, orget_hid_hdr_status
in the hid-hdr repository.