]> git.mxchange.org Git - flightgear.git/commitdiff
- remove obsolete definition
authormfranz <mfranz>
Fri, 9 Jun 2006 10:53:48 +0000 (10:53 +0000)
committermfranz <mfranz>
Fri, 9 Jun 2006 10:53:48 +0000 (10:53 +0000)
- make sure HUD is only initialized once

src/Cockpit/hud.cxx

index c6f779d1c2fa1b10a1f74760bed0c00e7a8f32df..7195ad5c28ce5a47b858ed1a2a34c7862b2d81a8 100644 (file)
 #include <Main/fg_props.hxx>
 #include <Scenery/scenery.hxx>
 
-#if defined (__sun) || defined ( __sgi )
-extern "C" {
-    extern void *memmove(void *, const void *, size_t);
-}
-#endif
-
 #include "hud.hxx"
 
 
-static HUD_Properties *HUD;
+static HUD_Properties *HUD = 0;
 
 static char units[5];
 
@@ -779,7 +773,8 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
     HUDtext->setPointSize(HUD_TextSize);
     HUD_TextList.setFont( HUDtext );
 
-    HUD = new HUD_Properties;
+    if (!HUD)
+        HUD = new HUD_Properties;
     return 0;  // For now. Later we may use this for an error code.
 
 }
@@ -804,6 +799,8 @@ int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
         input.close();
     }
 
+    if (!HUD)
+        HUD = new HUD_Properties;
     return 0;  // For now. Later we may use this for an error code.
 
 }