* Written by Sean D'Epagnier (c) 2006
*/
+#include <stdlib.h>
+
#include <GL/glut.h>
#include "internal.h"
* Written by Sean D'Epagnier (c) 2006
*/
+#include <stdio.h>
#include <stdlib.h>
#include <linux/fb.h>
#define TORMAP(x)(unsigned short)((x<0?0:x>1?1:x)*(GLfloat)(REVERSECMAPSIZE-1))
#define FROMCMAP(x) (GLfloat)x / (GLfloat)((1<<16) - 1)
-static struct fb_cmap ColorMap;
+static struct fb_cmap ColorMap, OriginalColorMap;
unsigned short RedColorMap[256], GreenColorMap[256], BlueColorMap[256];
to render the cursor, this is faster, it would be good to use a hardware
cursor if it exists instead */
+#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
+#include <string.h>
#include <linux/fb.h>
* Written by Sean D'Epagnier (c) 2006
*/
+#include <stdio.h>
+
#include <GL/gl.h>
#include <GL/glut.h>
}
/* initialize colormap */
- LoadColorMap();
+ if(FixedInfo.visual != FB_VISUAL_TRUECOLOR)
+ LoadColorMap();
}
void CreateBuffer()
glFBDevDestroyContext(Context);
glFBDevDestroyBuffer(Buffer);
glFBDevDestroyVisual(Visual);
+
Visual = NULL;
}
* Written by Sean D'Epagnier (c) 2006
*/
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int GpmMouse;
#endif
-int CurrentVT;
+int CurrentVT = 0;
int ConsoleFD = -1;
int KeyboardModifiers;
/* this is a hack to turn the cursor off */
ioctl(FrameBufferFD, FBIOPUT_VSCREENINFO, &VarInfo);
- RestoreColorMap();
+ if(FixedInfo.visual != FB_VISUAL_TRUECOLOR)
+ RestoreColorMap();
Active = 1;
Visible = 1;
VisibleSwitch = 1;
Redisplay = 1;
-
break;
}
}
#define REVERSECMAPSIZE (1<<REVERSECMAPSIZELOG)
extern unsigned short RedColorMap[256],
- GreenColorMap[256],
- BlueColorMap[256];
+ GreenColorMap[256],
+ BlueColorMap[256];
extern unsigned char ReverseColorMap[REVERSECMAPSIZE]
[REVERSECMAPSIZE]
[REVERSECMAPSIZE];
-void LoadOldColorMap(void);
+
void LoadColorMap(void);
-void UnloadColorMap(void);
void RestoreColorMap(void);
/* --- mouse --- */
*/
#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
#include <linux/fb.h>
* Written by Sean D'Epagnier (c) 2006
*/
+#include <string.h>
#include <sys/time.h>
#include <linux/fb.h>