The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

st/prober: Add serial number to system devices log

This is a "nice to have" when initially getting serial numbers wired up in a driver.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2500>

authored by

Beyley Cardellio and committed by
Marge Bot
ced199ef 93d76364

+11 -5
+11 -5
src/xrt/state_trackers/prober/p_prober.c
··· 852 852 853 853 u_pp(dg, "\n\tIn roles:"); 854 854 855 + #define GET(IDENT, FIELD, DEFAULT) xsysd->static_roles.IDENT ? xsysd->static_roles.IDENT->FIELD : DEFAULT 856 + #define GET_XDEV(IDENT, FIELD, DEFAULT) roles.IDENT >= 0 ? xsysd->xdevs[roles.IDENT]->FIELD : DEFAULT 857 + 855 858 #define PH(IDENT) \ 856 - u_pp(dg, "\n\t\t%s: %s, view count: %zu", #IDENT, \ 857 - xsysd->static_roles.IDENT ? xsysd->static_roles.IDENT->str : "<none>", \ 858 - xsysd->static_roles.IDENT ? xsysd->static_roles.IDENT->hmd->view_count : 0u); 859 - #define P(IDENT) u_pp(dg, "\n\t\t%s: %s", #IDENT, xsysd->static_roles.IDENT ? xsysd->static_roles.IDENT->str : "<none>") 860 - #define PD(IDENT) u_pp(dg, "\n\t\t%s: %s", #IDENT, roles.IDENT >= 0 ? xsysd->xdevs[roles.IDENT]->str : "<none>") 859 + u_pp(dg, "\n\t\t%s: %s (%s), view count: %zu", #IDENT, GET(IDENT, str, "<none>"), \ 860 + GET(IDENT, serial, "<none>"), GET(IDENT, hmd->view_count, 0u)); 861 + #define P(IDENT) u_pp(dg, "\n\t\t%s: %s (%s)", #IDENT, GET(IDENT, str, "<none>"), GET(IDENT, serial, "<none>")) 862 + #define PD(IDENT) \ 863 + u_pp(dg, "\n\t\t%s: %s (%s)", #IDENT, GET_XDEV(IDENT, str, "<none>"), GET_XDEV(IDENT, serial, "<none>")) 861 864 862 865 PH(head); 863 866 P(eyes); ··· 870 873 871 874 #undef P 872 875 #undef PD 876 + #undef PH 877 + #undef GET 878 + #undef GET_XDEV 873 879 } 874 880 875 881