]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/hud.cxx
Fix MSVC compilation
[flightgear.git] / src / Cockpit / hud.cxx
index bee7a6011d64cd63ad01acda58b090cc66af6f99..f9b9f3a9749b9cac69fb896ef681d5ed2f79d22b 100644 (file)
@@ -47,6 +47,7 @@
 #include <GUI/new_gui.hxx>           // FGFontCache
 #include <Main/globals.hxx>
 #include <Scenery/scenery.hxx>
+#include <Airports/runways.hxx>
 
 #include "hud.hxx"
 
@@ -260,9 +261,11 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
     }
 
     FGFontCache *fc = globals->get_fontcache();
-    HUD_Font = fc->getTexFont(fgGetString("/sim/hud/font/name", "Helvetica.txf"));
+    const char* fileName = fgGetString("/sim/hud/font/name", "Helvetica.txf");
+    HUD_Font = fc->getTexFont(fileName);
     if (!HUD_Font)
-        throw sg_throwable(string("/sim/hud/font/name is not a texture font"));
+        throw sg_io_exception("/sim/hud/font/name is not a texture font",
+                              sg_location(fileName));
 
     HUD_TextSize = fgGetFloat("/sim/hud/font/size", 10);