static void _gc_reset(GRAPHICS_CONTROLLER *gc) { if (gc->pg_open) { _close_osd(gc, BD_OVERLAY_PG); } if (gc->ig_open) { _close_osd(gc, BD_OVERLAY_IG); } gc->popup_visible = 0; gc->valid_mouse_position = 0; graphics_processor_free(&gc->igp); graphics_processor_free(&gc->pgp); pg_display_set_free(&gc->pgs); pg_display_set_free(&gc->igs); X_FREE(gc->bog_data); }
static void _gc_clear_osd(GRAPHICS_CONTROLLER *gc, int plane) { if (gc->overlay_proc) { /* clear plane */ const BD_OVERLAY ov = { .pts = -1, .plane = plane, .x = 0, .y = 0, .w = 1920, .h = 1080, .palette = NULL, .img = NULL, }; gc->overlay_proc(gc->overlay_proc_handle, &ov); } if (plane) { gc->ig_drawn = 0; } else { gc->pg_drawn = 0; } } static void _gc_reset(GRAPHICS_CONTROLLER *gc) { _gc_clear_osd(gc, 0); _gc_clear_osd(gc, 1); gc->popup_visible = 0; graphics_processor_free(&gc->igp); graphics_processor_free(&gc->pgp); pg_display_set_free(&gc->pgs); pg_display_set_free(&gc->igs); X_FREE(gc->enabled_button); }