X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fsplash.cxx;h=9152fb26dcf2b2dc78bfc26009c3216c971c2462;hb=af4e47179edfacdcad6a49d413e14d71df0ac22d;hp=7773171589ecc9b3c12f5b00f257cb6399367ea0;hpb=904a99714e1f1c11d5175e42f692df981bc6625c;p=flightgear.git diff --git a/src/Main/splash.cxx b/src/Main/splash.cxx index 777317158..9152fb26d 100644 --- a/src/Main/splash.cxx +++ b/src/Main/splash.cxx @@ -185,6 +185,7 @@ static osg::Node* fgCreateSplashCamera() char *namestring = genNameString(); fgSetString("/sim/startup/program-name", namestring); + delete[] namestring; SGPath tpath( globals->get_fg_root() ); if (splash_texture == NULL || !strcmp(splash_texture, "")) { @@ -196,9 +197,10 @@ static osg::Node* fgCreateSplashCamera() tpath.append( "Textures/Splash" ); tpath.concat( num_str ); tpath.concat( ".png" ); - } else - tpath.append( splash_texture ); - + } else { + tpath = globals->resolve_maybe_aircraft_path(splash_texture); + } + osg::Texture2D* splashTexture = new osg::Texture2D; splashTexture->setImage(osgDB::readImageFile(tpath.c_str())); @@ -303,7 +305,6 @@ static osg::Node* fgCreateSplashCamera() text->setPosition(osg::Vec3(0, 0.92, 0)); text->setAlignment(osgText::Text::CENTER_CENTER); prop = fgGetNode("/sim/startup/program-name", "FlightGear"); - delete namestring; text->setUpdateCallback(new FGSplashTextUpdateCallback(prop)); geode->addDrawable(text); @@ -354,11 +355,9 @@ osg::Node* fgCreateSplashNode() { void fgSplashInit () { SG_LOG( SG_GENERAL, SG_INFO, "Initializing splash screen" ); globals->get_renderer()->splashinit(); - fgRequestRedraw(); } void fgSplashProgress ( const char *text ) { SG_LOG( SG_GENERAL, SG_INFO, "Splash screen progress " << text ); fgSetString("/sim/startup/splash-progress-text", text); - fgRequestRedraw(); }