shithub: choc

Download patch

ref: a2afcffe4c65a16f1ad20f87e9a8867dc0deaf1b
parent: 2c2e0d5ac8e9629f5abb66cf90efe4e2e7c0ad02
author: Simon Howard <[email protected]>
date: Tue Dec 2 14:19:48 EST 2008

Use the hardware palette for textscreen and Hexen graphical startup.

Subversion-branch: /branches/raven-branch
Subversion-revision: 1403

--- a/src/i_videohr.c
+++ b/src/i_videohr.c
@@ -48,7 +48,7 @@
         return false;
     }
 
-    flags = SDL_SWSURFACE;
+    flags = SDL_SWSURFACE | SDL_HWPALETTE | SDL_DOUBLEBUF;
 
     hr_surface = SDL_SetVideoMode(HR_SCREENWIDTH, HR_SCREENHEIGHT, 8, flags);
 
--- a/textscreen/txt_sdl.c
+++ b/textscreen/txt_sdl.c
@@ -115,9 +115,15 @@
 
 int TXT_Init(void)
 {
+    int flags;
+
     SDL_InitSubSystem(SDL_INIT_VIDEO);
-    
-    screen = SDL_SetVideoMode(TXT_SCREEN_W * CHAR_W, TXT_SCREEN_H * CHAR_H, 8, 0);
+
+    flags = SDL_SWSURFACE | SDL_HWPALETTE | SDL_DOUBLEBUF;
+
+    screen = SDL_SetVideoMode(TXT_SCREEN_W * CHAR_W,
+                              TXT_SCREEN_H * CHAR_H,
+                              8, flags);
 
     if (screen == NULL)
         return 0;