[libbluray-devel] Added defines for IG UI model

hpi1 git at videolan.org
Wed Feb 9 16:58:04 CET 2011


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Feb  9 17:57:28 2011 +0200| [00b51189b32f3a8c71e177494698ab3e3f12a958] | committer: hpi1

Added defines for IG UI model

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=00b51189b32f3a8c71e177494698ab3e3f12a958
---

 src/libbluray/decoders/graphics_controller.c |    6 +++---
 src/libbluray/decoders/ig.h                  |    3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c
index daa034e..5ec57ba 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -316,7 +316,7 @@ static void _render_page(GRAPHICS_CONTROLLER *gc,
     unsigned        ii;
     unsigned        selected_button_id = bd_psr_read(gc->regs, PSR_SELECTED_BUTTON_ID);
 
-    if (s->ics->interactive_composition.ui_model == 1 && !gc->popup_visible) {
+    if (s->ics->interactive_composition.ui_model == IG_UI_MODEL_POPUP && !gc->popup_visible) {
         TRACE("_render_page(): popup menu not visible\n");
 
         _gc_clear_osd(gc, 1);
@@ -393,7 +393,7 @@ static int _user_input(GRAPHICS_CONTROLLER *gc, bd_vk_key_e key, GC_NAV_CMDS *cm
     unsigned        ii;
     int             activated_btn_id = -1;
 
-    if (s->ics->interactive_composition.ui_model == 1 && !gc->popup_visible) {
+    if (s->ics->interactive_composition.ui_model == IG_UI_MODEL_POPUP && !gc->popup_visible) {
         TRACE("_user_input(): popup menu not visible\n");
         return -1;
     }
@@ -776,7 +776,7 @@ int gc_run(GRAPHICS_CONTROLLER *gc, gc_ctrl_e ctrl, uint32_t param, GC_NAV_CMDS
             /* fall thru (BD_VK_POPUP) */
 
         case GC_CTRL_POPUP:
-            if (!gc->igs || !gc->igs->ics || gc->igs->ics->interactive_composition.ui_model != 1) {
+            if (gc->igs->ics->interactive_composition.ui_model != IG_UI_MODEL_POPUP) {
                 /* not pop-up menu */
                 break;
             }
diff --git a/src/libbluray/decoders/ig.h b/src/libbluray/decoders/ig.h
index f4cd507..7d242fd 100644
--- a/src/libbluray/decoders/ig.h
+++ b/src/libbluray/decoders/ig.h
@@ -127,6 +127,9 @@ typedef struct bd_ig_interactive_composition_s {
 
 } BD_IG_INTERACTIVE_COMPOSITION;
 
+#define IG_UI_MODEL_ALWAYS_ON 0
+#define IG_UI_MODEL_POPUP     1
+
 /*
  * segment
  */



More information about the libbluray-devel mailing list