libbluray | branch: master | hpi1 <[email protected]> | Sun Feb  6 20:22:22 
2011 +0200| [e2bcd73e6c1e98cca7d1b5cfdc37117a9f479371] | committer: hpi1

_mouse_move(): only search for SELECTED state objects.
Fixes the case when there's no NORMAL state object for button.
(Thanks to Erik Van Grunderbeeck <[email protected]>)

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

 src/libbluray/decoders/graphics_controller.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/libbluray/decoders/graphics_controller.c 
b/src/libbluray/decoders/graphics_controller.c
index 5c5d923..1640b46 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -710,7 +710,8 @@ static void _mouse_move(GRAPHICS_CONTROLLER *gc, unsigned 
x, unsigned y, GC_NAV_
         if (x < button->x_pos || y < button->y_pos)
             continue;
 
-        BD_PG_OBJECT *object = _find_object_for_button(s, button, BTN_NORMAL);
+        /* Check for SELECTED state object (button that can be selected) */
+        BD_PG_OBJECT *object = _find_object_for_button(s, button, 
BTN_SELECTED);
         if (!object)
             continue;
 
@@ -725,10 +726,6 @@ static void _mouse_move(GRAPHICS_CONTROLLER *gc, unsigned 
x, unsigned y, GC_NAV_
             return;
         }
 
-        // can button be selected ?
-        if (!_find_object_for_button(s, button, BTN_SELECTED))
-            return;
-
         new_btn_id = button->id;
         break;
     }

_______________________________________________
libbluray-devel mailing list
[email protected]
http://mailman.videolan.org/listinfo/libbluray-devel

Reply via email to