st/prober: Move rgb struct declaration.

Fixes GCC 13 warning [-Wunused-variable].

Only declare rgb struct when PSVR is enabled, where it's only used.
This commit is contained in:
Lubosz Sarnecki 2023-08-10 10:30:09 +02:00 committed by Jakob Bornecrantz
parent 634fa71fda
commit a2d3621058

View file

@ -167,10 +167,10 @@ p_factory_ensure_frameserver(struct p_factory *fact)
struct xrt_frame_sink *xsink = NULL;
struct xrt_frame_sink *xsinks[4] = {0};
struct xrt_colour_rgb_f32 rgb[2] = {{1.f, 0.f, 0.f}, {1.f, 0.f, 1.f}};
// We create the two psmv trackers up front, but don't start them.
#if defined(XRT_HAVE_OPENCV) && defined(XRT_BUILD_DRIVER_PSMV)
struct xrt_colour_rgb_f32 rgb[2] = {{1.f, 0.f, 0.f}, {1.f, 0.f, 1.f}};
t_psmv_create(&fact->xfctx, &rgb[0], fact->data, &fact->xtmv[0], &xsinks[0]);
t_psmv_create(&fact->xfctx, &rgb[1], fact->data, &fact->xtmv[1], &xsinks[1]);
#endif