[vlc-commits] Fix CD+G scrolling.

Laurent Aimar git at videolan.org
Mon Sep 12 22:59:45 CEST 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Sep 12 22:24:47 2011 +0200| [df7b4814c761e6ff8562405b44f6071652ad24b0] | committer: Laurent Aimar

Fix CD+G scrolling.

It was broken by f9b664eac0e1a7bceed9d7b5854fd9fc351b4aab.

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

 modules/codec/cdg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/cdg.c b/modules/codec/cdg.c
index 322600a..a340576 100644
--- a/modules/codec/cdg.c
+++ b/modules/codec/cdg.c
@@ -324,8 +324,8 @@ static int DecodeScroll( decoder_sys_t *p_cdg, const uint8_t *p_data, int b_copy
 
             if( b_copy )
             {
-                dy %= CDG_SCREEN_HEIGHT;
-                dx %= CDG_SCREEN_WIDTH;
+                dy = (dy + CDG_SCREEN_HEIGHT) % CDG_SCREEN_HEIGHT;
+                dx = (dx + CDG_SCREEN_WIDTH ) % CDG_SCREEN_WIDTH;
             }
             else
             {



More information about the vlc-commits mailing list