summaryrefslogtreecommitdiff
path: root/textscreen/txt_sdl.c
diff options
context:
space:
mode:
authorSimon Howard2009-06-07 16:41:46 +0000
committerSimon Howard2009-06-07 16:41:46 +0000
commit895f440628c8c45aa98bd7af996ca6ae48065224 (patch)
tree173b220b644247d3095aeb96197769b0284d086c /textscreen/txt_sdl.c
parentcf6e976f371dfe19af0bd3917745698d778586dc (diff)
downloadchocolate-doom-895f440628c8c45aa98bd7af996ca6ae48065224.tar.gz
chocolate-doom-895f440628c8c45aa98bd7af996ca6ae48065224.tar.bz2
chocolate-doom-895f440628c8c45aa98bd7af996ca6ae48065224.zip
Catch errors when initialising SDL. Use the small textscreen font by
default on Windows CE if no fullscreen modes are available. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1570
Diffstat (limited to 'textscreen/txt_sdl.c')
-rw-r--r--textscreen/txt_sdl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/textscreen/txt_sdl.c b/textscreen/txt_sdl.c
index 1bc42d7c..6cfee614 100644
--- a/textscreen/txt_sdl.c
+++ b/textscreen/txt_sdl.c
@@ -142,6 +142,9 @@ static void ChooseFont(void)
if (modes == NULL || modes == (SDL_Rect **) -1 || *modes == NULL)
{
+#ifdef _WIN32_WCE
+ font = &small_font;
+#endif
return;
}
@@ -166,7 +169,10 @@ static void ChooseFont(void)
int TXT_Init(void)
{
- SDL_InitSubSystem(SDL_INIT_VIDEO);
+ if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
+ {
+ return 0;
+ }
ChooseFont();