Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/engines/fb


Modified Files:
        evas_fb_main.c 


Log Message:


fix palette setting..

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/fb/evas_fb_main.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_fb_main.c      8 Jan 2003 01:02:21 -0000       1.2
+++ evas_fb_main.c      12 Jun 2004 06:47:42 -0000      1.3
@@ -51,15 +51,14 @@
 {
   int r, g, b, i;
   
-  /* generate the palette */
   if (mode->fb_var.bits_per_pixel != 8)
     return;
   i = 0;
-  /* set colormap */
 
   if (ioctl(fb, FBIOGETCMAP, &cmap) == -1)
     perror("ioctl FBIOGETCMAP");
-   
+  
+  /* generate the palette */ 
   for (r = 0; r < 8; r++)
     {
       for (g = 0; g < 8; g++)
@@ -79,6 +78,7 @@
        }
     }
 
+  /* set colormap */
   if (ioctl(fb, FBIOPUTCMAP, &cmap) == -1)
     perror("ioctl FBIOPUTCMAP");
    
@@ -89,19 +89,21 @@
 {
   int i;
   
-  /* generate the palette */
   if (mode->fb_var.bits_per_pixel != 8)
     return;
+
+  if (ioctl(fb, FBIOGETCMAP, &cmap) == -1)
+    perror("ioctl FBIOGETCMAP");
+
+  /* generate the palette */
   for (i = 0; i < 256; i++)
     red[i] = (i << 8) | i;
   for (i = 0; i < 256; i++)
     green[i] = (i << 8) | i;
   for (i = 0; i < 256; i++)
     blue[i] = (i << 8) | i;
+  
   /* set colormap */
-
-  if (ioctl(fb, FBIOGETCMAP, &cmap) == -1)
-    perror("ioctl FBIOGETCMAP");
   if (ioctl(fb, FBIOPUTCMAP, &cmap) == -1)
     perror("ioctl FBIOPUTCMAP");
    




-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to