svgalib (1:1.4.3-33) 003_fbdev.patch

Summary

 utils/restorepalette.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

    
download this patch

Patch contents

Index: b/utils/restorepalette.c
===================================================================
--- a/utils/restorepalette.c
+++ b/utils/restorepalette.c
@@ -109,14 +109,18 @@ void
 main (int argc, char *argv[])
 {
   int i;
+  int chipset;
 
   vga_init ();
 
   if (argc > 1)
     process_palette_file (argv);
 
-  if (vga_getcurrentchipset () != EGA)
+  /* robert@debian.org, May 26 2002: added check for chipset != FBDEV */
+  chipset = vga_getcurrentchipset ();
+  if(chipset != EGA)
     {
+      if (chipset != FBDEV)
       /* Restore textmode/16-color mode palette */
       for (i = 0; i < 16; i++)
 	{
@@ -133,9 +137,11 @@ main (int argc, char *argv[])
 	vga_setpalette (i, default_red[i], default_green[i],
 			default_blue[i]);
 
+      if (chipset != FBDEV) {
       port_in (IS1_RC);
       delay ();
       port_out (0x20, ATT_IW);	/* enable display */
+      }
     }
   exit (0);
 }