From 72ec425f3b4e14ace8f901c4f9d50161afff9172 Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Mon, 23 Sep 2013 11:27:26 +0300 Subject: input_bluray: delay empty overlay hiding (hide at next FLUSH event) --- src/input/input_bluray.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/input/input_bluray.c b/src/input/input_bluray.c index 894926372..eea6ef957 100644 --- a/src/input/input_bluray.c +++ b/src/input/input_bluray.c @@ -169,6 +169,7 @@ static void clear_overlay(xine_osd_t *osd) osd->osd.y1 = osd->osd.height; osd->osd.x2 = 0; osd->osd.y2 = 0; + osd->osd.area_touched = 0; } static xine_osd_t *get_overlay(bluray_input_plugin_t *this, int plane) @@ -293,17 +294,25 @@ static void overlay_proc(void *this_gen, const BD_OVERLAY * const ov) return; case BD_OVERLAY_CLEAR: - xine_osd_hide(osd, 0); clear_overlay(osd); return; - case BD_OVERLAY_FLUSH: - xine_osd_show(osd, 0); +#if BLURAY_VERSION >= BLURAY_VERSION_CODE(0, 3, 0) + case BD_OVERLAY_HIDE: + osd->osd.area_touched = 0; /* will be hiden at next commit time */ + break; +#endif + case BD_OVERLAY_FLUSH: + if (!osd->osd.area_touched) { + xine_osd_hide(osd, 0); + } else { + xine_osd_show(osd, 0); + } #if BLURAY_VERSION < BLURAY_VERSION_CODE(0, 2, 2) if (ov->plane == 1) { - this->menu_open = 1; - send_num_buttons(this, 1); + this->menu_open = !!osd->osd.area_touched; + send_num_buttons(this, !!osd->osd.area_touched); } #endif return; -- cgit v1.2.3