st/gui: Do not call prober select in debug scene

This commit is contained in:
Jakob Bornecrantz 2019-10-10 21:36:09 +01:00
parent 7239282aab
commit 5f1078675d
3 changed files with 9 additions and 3 deletions

View file

@ -226,7 +226,7 @@ on_elem_sink(const char *name, enum u_var_kind kind, void *ptr, void *priv)
return;
}
if (p->xp->tracking == NULL) {
if (p->xp == NULL || p->xp->tracking == NULL) {
return;
}
@ -306,8 +306,6 @@ gui_scene_debug(struct gui_program *p)
gui_scene_push_front(p, &ds->base);
gui_prober_select(p);
// Create the sink interceptors.
u_var_visit(on_root_enter_sink, on_root_exit_sink, on_elem_sink, p);
}

View file

@ -32,6 +32,12 @@ scene_render(struct gui_scene *scene, struct gui_program *p)
if (igButton("Debug Test", button_dims)) {
gui_scene_delete_me(p, scene);
// If we have created a prober select devices now.
if (p->xp != NULL) {
gui_prober_select(p);
}
gui_scene_debug(p);
}

View file

@ -34,6 +34,8 @@ main(int argc, char **argv)
// First scene to start with.
if (argc >= 2 && strcmp("debug", argv[1]) == 0) {
// We have created a prober select devices now.
gui_prober_select(&p.base);
gui_scene_debug(&p.base);
} else if (argc >= 2 && strcmp("calibrate", argv[1]) == 0) {
gui_scene_select_video_calibrate(&p.base);