changeset 1198:e7c9e8eaa426

Should fix bytes per pixel for 15bpp.
author atmosfear
date Sat, 23 Jun 2001 13:28:28 +0000
parents 80ca716ce5e9
children 75bd6146cc77
files libvo/vo_ggi.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_ggi.c	Sat Jun 23 10:18:23 2001 +0000
+++ b/libvo/vo_ggi.c	Sat Jun 23 13:28:28 2001 +0000
@@ -195,7 +195,7 @@
 	    mode.size.x, mode.size.y,
 	    vo_depthonscreen, ggi_conf.bpp);
 
-    ggi_conf.bppmul = ggi_conf.bpp/8;
+    ggi_conf.bppmul = (ggi_conf.bpp+7)/8;
 
     return(0);
 }
@@ -326,8 +326,8 @@
 
     ggi_conf.format = format;
 
-    ggi_conf.framePlaneRGB = width * height * (ggi_conf.bpp/8); /* fix it! */
-    ggi_conf.stridePlaneRGB = width * (ggi_conf.bpp/8);
+    ggi_conf.framePlaneRGB = width * height * ((ggi_conf.bpp+7)/8); /* fix it! */
+    ggi_conf.stridePlaneRGB = width * ((ggi_conf.bpp+7)/8);
 #ifdef GGI_PLANAR_NOCONV
     ggi_conf.framePlaneY = width * height;
     ggi_conf.framePlaneUV = (width * height) >> 2;