[libbluray-devel] Added bd_set_scr()

hpi1 git at videolan.org
Sun Jun 19 23:30:58 CEST 2011


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Jun 14 15:14:36 2011 +0300| [573431998bedeb55e7efd703d72b2986c7dff7eb] | committer: hpi1

Added bd_set_scr()

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

 src/libbluray/bluray.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index e21919d..6cf7410 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -2152,20 +2152,23 @@ int bd_get_event(BLURAY *bd, BD_EVENT *event)
  * user interaction
  */
 
-int bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y)
+void bd_set_scr(BLURAY *bd, int64_t pts)
 {
     if (pts >= 0) {
         bd_psr_write(bd->regs, PSR_TIME, (uint32_t)(((uint64_t)pts) >> 1));
     }
+}
+
+int bd_mouse_select(BLURAY *bd, int64_t pts, uint16_t x, uint16_t y)
+{
+    bd_set_scr(bd, pts);
 
     return _run_gc(bd, GC_CTRL_MOUSE_MOVE, (x << 16) | y);
 }
 
 int bd_user_input(BLURAY *bd, int64_t pts, uint32_t key)
 {
-    if (pts >= 0) {
-        bd_psr_write(bd->regs, PSR_TIME, (uint32_t)(((uint64_t)pts) >> 1));
-    }
+    bd_set_scr(bd, pts);
 
     return _run_gc(bd, GC_CTRL_VK_KEY, key);
 }



More information about the libbluray-devel mailing list