The open source OpenXR runtime
0
fork

Configure Feed

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

st/gui: Make it possible to pass in remote address from the command line

+10 -5
+2 -1
src/xrt/state_trackers/gui/gui_common.h
··· 224 224 /*! 225 225 * Remote control debugging UI. 226 226 * 227 + * @param Optional address. 227 228 * @ingroup gui 228 229 */ 229 230 void 230 - gui_scene_remote(struct gui_program *p); 231 + gui_scene_remote(struct gui_program *p, const char *address); 231 232 232 233 /*! 233 234 * Given the frameserver runs the calibration code on it.
+1 -1
src/xrt/state_trackers/gui/gui_scene_main_menu.c
··· 74 74 if (igButton("Remote", button_dims)) { 75 75 gui_scene_delete_me(p, scene); 76 76 77 - gui_scene_remote(p); 77 + gui_scene_remote(p, NULL); 78 78 } 79 79 80 80 igSeparator();
+6 -2
src/xrt/state_trackers/gui/gui_scene_remote.c
··· 387 387 */ 388 388 389 389 void 390 - gui_scene_remote(struct gui_program *p) 390 + gui_scene_remote(struct gui_program *p, const char *address) 391 391 { 392 392 struct gui_remote *gr = U_TYPED_CALLOC(struct gui_remote); 393 393 ··· 396 396 gr->rc.fd = -1; 397 397 398 398 // GUI input defaults. 399 - snprintf(gr->address, sizeof(gr->address), "localhost"); 399 + if (address != NULL) { 400 + snprintf(gr->address, sizeof(gr->address), "%s", address); 401 + } else { 402 + snprintf(gr->address, sizeof(gr->address), "localhost"); 403 + } 400 404 gr->port = 4242; 401 405 402 406 gui_scene_push_front(p, &gr->base);
+1 -1
src/xrt/targets/gui/gui_sdl2_main.c
··· 47 47 } else if (argc >= 2 && strcmp("record", argv[1]) == 0) { 48 48 gui_scene_record(&p.base, argc >= 3 ? argv[2] : NULL); 49 49 } else if (argc >= 2 && strcmp("remote", argv[1]) == 0) { 50 - gui_scene_remote(&p.base); 50 + gui_scene_remote(&p.base, argc >= 3 ? argv[2] : NULL); 51 51 } else { 52 52 gui_scene_main_menu(&p.base); 53 53 }