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
This commit is contained in:
parent
cf6e976f37
commit
895f440628
1 changed files with 7 additions and 1 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue