mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
st/oxr: Improve destruction of GUI hack
This commit is contained in:
parent
86244f726f
commit
a29dd8c0a4
|
@ -44,7 +44,7 @@ extern void
|
|||
oxr_sdl2_hack_start(void *hack, struct xrt_prober *xp);
|
||||
|
||||
extern void
|
||||
oxr_sdl2_hack_stop(void *hack);
|
||||
oxr_sdl2_hack_stop(void **hack_ptr);
|
||||
/* ---- HACK ---- */
|
||||
|
||||
static inline int32_t
|
||||
|
@ -72,7 +72,7 @@ oxr_instance_destroy(struct oxr_logger *log, struct oxr_handle_base *hb)
|
|||
}
|
||||
|
||||
/* ---- HACK ---- */
|
||||
oxr_sdl2_hack_stop(inst->hack);
|
||||
oxr_sdl2_hack_stop(&inst->hack);
|
||||
/* ---- HACK ---- */
|
||||
|
||||
xrt_prober_destroy(&inst->prober);
|
||||
|
|
|
@ -30,7 +30,7 @@ oxr_sdl2_hack_start(void *hack, struct xrt_prober *xp)
|
|||
{}
|
||||
|
||||
void
|
||||
oxr_sdl2_hack_stop(void *hack)
|
||||
oxr_sdl2_hack_stop(void **hack)
|
||||
{}
|
||||
|
||||
#else
|
||||
|
@ -277,9 +277,9 @@ oxr_sdl2_hack_start(void *hack, struct xrt_prober *xp)
|
|||
}
|
||||
|
||||
void
|
||||
oxr_sdl2_hack_stop(void *hack)
|
||||
oxr_sdl2_hack_stop(void **hack_ptr)
|
||||
{
|
||||
struct sdl2_program *p = (struct sdl2_program *)hack;
|
||||
struct sdl2_program *p = *(struct sdl2_program **)hack_ptr;
|
||||
if (p == NULL) {
|
||||
return;
|
||||
}
|
||||
|
@ -291,5 +291,6 @@ oxr_sdl2_hack_stop(void *hack)
|
|||
os_thread_helper_destroy(&p->oth);
|
||||
|
||||
free(p);
|
||||
*hack_ptr = NULL;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue