diff options
author | Simon Howard | 2008-12-02 19:19:48 +0000 |
---|---|---|
committer | Simon Howard | 2008-12-02 19:19:48 +0000 |
commit | a2afcffe4c65a16f1ad20f87e9a8867dc0deaf1b (patch) | |
tree | 0659d437f78b1f990321cb2c29343448ad02680d | |
parent | 2c2e0d5ac8e9629f5abb66cf90efe4e2e7c0ad02 (diff) | |
download | chocolate-doom-a2afcffe4c65a16f1ad20f87e9a8867dc0deaf1b.tar.gz chocolate-doom-a2afcffe4c65a16f1ad20f87e9a8867dc0deaf1b.tar.bz2 chocolate-doom-a2afcffe4c65a16f1ad20f87e9a8867dc0deaf1b.zip |
Use the hardware palette for textscreen and Hexen graphical startup.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1403
-rw-r--r-- | src/i_videohr.c | 2 | ||||
-rw-r--r-- | textscreen/txt_sdl.c | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/i_videohr.c b/src/i_videohr.c index f1a7e5f7..1091fb74 100644 --- a/src/i_videohr.c +++ b/src/i_videohr.c @@ -48,7 +48,7 @@ boolean I_SetVideoModeHR(void) return false; } - flags = SDL_SWSURFACE; + flags = SDL_SWSURFACE | SDL_HWPALETTE | SDL_DOUBLEBUF; hr_surface = SDL_SetVideoMode(HR_SCREENWIDTH, HR_SCREENHEIGHT, 8, flags); diff --git a/textscreen/txt_sdl.c b/textscreen/txt_sdl.c index 823685a1..d695c898 100644 --- a/textscreen/txt_sdl.c +++ b/textscreen/txt_sdl.c @@ -115,9 +115,15 @@ static SDL_Color ega_colors[] = 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; |