Re: [AD] Memory bitmaps badly broken

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2010-09-19, at 4:23 PM, Peter Wang wrote:
> Perhaps the `pixel_size' field I added to ALLEGRO_LOCKED_REGION is not
> being set.  That would be consistent with drawing each scanline from
> the left of the locked region.

You were right, that was it. Is this an acceptable fix?

Index: ogl_bitmap.c
===================================================================
--- ogl_bitmap.c	(revision 13644)
+++ ogl_bitmap.c	(working copy)
@@ -753,7 +819,8 @@
 
    bitmap->locked_region.format = format;
    bitmap->locked_region.pitch = -pitch;
-
+   bitmap->locked_region.pixel_size = al_get_pixel_size(format);
+   
    if (old_disp) {
       _al_set_current_display_only(old_disp);
    }





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/