This patch changes the dfb_surfacemanager_adjust_heap_offset() to allow
chunk length = 0. This will help in the cases where the primary surface
will consume all of the video memory. I don't see any obvious problems
with this but I've not tested it in action yet.

-- 
Ville Syrj�l�
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/
Index: DirectFB/src/core/surfacemanager.c
===================================================================
RCS file: /cvs/directfb/DirectFB/src/core/surfacemanager.c,v
retrieving revision 1.37
diff -u -d -r1.37 surfacemanager.c
--- DirectFB/src/core/surfacemanager.c  3 Dec 2002 18:06:33 -0000       1.37
+++ DirectFB/src/core/surfacemanager.c  21 Jan 2003 11:24:27 -0000
@@ -201,7 +201,7 @@
 
      if (manager->chunks->buffer == NULL) {
           /* first chunk is free */
-          if (offset < manager->chunks->offset + manager->chunks->length) {
+          if (offset <= manager->chunks->offset + manager->chunks->length) {
                /* ok, just recalculate offset and length */
                manager->chunks->length = manager->chunks->offset + 
manager->chunks->length - offset;
                manager->chunks->offset = offset;

Reply via email to