diff options
Diffstat (limited to 'textscreen/txt_sdl.c')
-rw-r--r-- | textscreen/txt_sdl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/textscreen/txt_sdl.c b/textscreen/txt_sdl.c index 74e4cd3f..895e1da0 100644 --- a/textscreen/txt_sdl.c +++ b/textscreen/txt_sdl.c @@ -205,11 +205,7 @@ static void ChooseFont(void) if (info == NULL) { -#ifdef _WIN32_WCE - font = &small_font; -#else font = &main_font; -#endif return; } @@ -250,15 +246,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; @@ -284,6 +284,7 @@ int TXT_Init(void) void TXT_Shutdown(void) { free(screendata); + screendata = NULL; SDL_QuitSubSystem(SDL_INIT_VIDEO); } |