diff options
Diffstat (limited to 'textscreen/txt_sdl.c')
-rw-r--r-- | textscreen/txt_sdl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/textscreen/txt_sdl.c b/textscreen/txt_sdl.c index c51fcaf3..29f8de4c 100644 --- a/textscreen/txt_sdl.c +++ b/textscreen/txt_sdl.c @@ -215,15 +215,19 @@ static void ChooseFont(void) int TXT_Init(void) { + int flags; + if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) { return 0; } + flags = SDL_SWSURFACE | SDL_HWPALETTE | SDL_DOUBLEBUF; + ChooseFont(); screen = SDL_SetVideoMode(TXT_SCREEN_W * font->w, - TXT_SCREEN_H * font->h, 8, 0); + TXT_SCREEN_H * font->h, 8, flags); if (screen == NULL) return 0; @@ -249,6 +253,7 @@ int TXT_Init(void) void TXT_Shutdown(void) { free(screendata); + screendata = NULL; SDL_QuitSubSystem(SDL_INIT_VIDEO); } |