bark if the requested font isn't a texture font. A more graceful recovery
doesn't buy us much, as the font is only set at initialization time and not changeable later. Better tell the user immediately that he goofed.
This commit is contained in:
parent
675ff6fbc8
commit
95da0171a0
1 changed files with 3 additions and 0 deletions
|
@ -766,6 +766,9 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
|
|||
|
||||
FGFontCache *fc = globals->get_fontcache();
|
||||
HUD_Font = fc->getTexFont(fgGetString("/sim/hud/font/name", "Helvetica.txf"));
|
||||
if (!HUD_Font)
|
||||
throw sg_throwable(string("/sim/hud/font/name is not a texture font"));
|
||||
|
||||
HUD_TextSize = fgGetFloat("/sim/hud/font/size", 10);
|
||||
|
||||
HUDtext = new fntRenderer();
|
||||
|
|
Loading…
Add table
Reference in a new issue