Fix out of order initialization crash (not sure how it worked before
unless some recent changes subtlely changed some init order items around.)
This commit is contained in:
parent
43e48070fe
commit
10baa71a65
3 changed files with 54 additions and 27 deletions
28
configure.ac
28
configure.ac
|
@ -190,6 +190,20 @@ dnl Thread related checks
|
||||||
AC_CHECK_LIB(pthread, pthread_exit)
|
AC_CHECK_LIB(pthread, pthread_exit)
|
||||||
AC_CHECK_LIB(socket, socket)
|
AC_CHECK_LIB(socket, socket)
|
||||||
|
|
||||||
|
dnl check for glut location
|
||||||
|
AC_CHECK_HEADER(GL/glut.h)
|
||||||
|
if test "x$ac_cv_header_GL_glut_h" = "xyes"; then
|
||||||
|
AC_DEFINE([GLUT_H], "GL/glut.h", [Define as glut.h include location])
|
||||||
|
else
|
||||||
|
AC_CHECK_HEADER(GLUT/glut.h)
|
||||||
|
if test "x$ac_cv_header_GLUT_glut_h" = "xyes"; then
|
||||||
|
AC_DEFINE([GLUT_H], "GLUT/glut.h", [Define as glut.h include location])
|
||||||
|
else
|
||||||
|
echo "Neither GL/glut.h nor GLUT/glut.h found. Cannot continue"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
dnl check for OpenGL related libraries
|
dnl check for OpenGL related libraries
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
*-*-cygwin* | *-*-mingw32*)
|
*-*-cygwin* | *-*-mingw32*)
|
||||||
|
@ -266,20 +280,6 @@ case "${host}" in
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dnl check for glut location
|
|
||||||
AC_CHECK_HEADER(GL/glut.h)
|
|
||||||
if test "x$ac_cv_header_GL_glut_h" = "xyes"; then
|
|
||||||
AC_DEFINE([GLUT_H], "GL/glut.h", [Define as glut.h include location])
|
|
||||||
else
|
|
||||||
AC_CHECK_HEADER(GLUT/glut.h)
|
|
||||||
if test "x$ac_cv_header_GLUT_glut_h" = "xyes"; then
|
|
||||||
AC_DEFINE([GLUT_H], "GLUT/glut.h", [Define as glut.h include location])
|
|
||||||
else
|
|
||||||
echo "Neither GL/glut.h nor GLUT/glut.h found. Cannot continue"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
opengl_LIBS="$LIBS"
|
opengl_LIBS="$LIBS"
|
||||||
LIBS="$base_LIBS"
|
LIBS="$base_LIBS"
|
||||||
|
|
||||||
|
|
|
@ -233,12 +233,17 @@ getFreeze ()
|
||||||
static void
|
static void
|
||||||
setFreeze (bool f)
|
setFreeze (bool f)
|
||||||
{
|
{
|
||||||
frozen = f;
|
frozen = f;
|
||||||
// Stop sound on a pause
|
|
||||||
if (f)
|
// Stop sound on a pause
|
||||||
globals->get_soundmgr()->pause();
|
FGSoundMgr *s = globals->get_soundmgr();
|
||||||
else
|
if ( s != NULL ) {
|
||||||
globals->get_soundmgr()->resume();
|
if ( f ) {
|
||||||
|
s->pause();
|
||||||
|
} else {
|
||||||
|
s->resume();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,18 +42,40 @@ FGGlobals *globals;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
FGGlobals::FGGlobals() :
|
FGGlobals::FGGlobals() :
|
||||||
subsystem_mgr(new FGSubsystemMgr),
|
subsystem_mgr( new FGSubsystemMgr ),
|
||||||
sim_time_sec(0.0),
|
sim_time_sec( 0.0 ),
|
||||||
|
fg_root( "" ),
|
||||||
|
fg_scenery( "" ),
|
||||||
#if defined(FX) && defined(XMESA)
|
#if defined(FX) && defined(XMESA)
|
||||||
fullscreen( true ),
|
fullscreen( true ),
|
||||||
#endif
|
#endif
|
||||||
warp( 0 ),
|
warp( 0 ),
|
||||||
warp_delta( 0 ),
|
warp_delta( 0 ),
|
||||||
props(new SGPropertyNode),
|
time_params( NULL ),
|
||||||
initial_state(0),
|
ephem( NULL ),
|
||||||
locale(NULL),
|
mag( NULL ),
|
||||||
commands(new SGCommandMgr),
|
autopilot( NULL ),
|
||||||
io(new FGIO)
|
route( NULL ),
|
||||||
|
soundmgr( NULL ),
|
||||||
|
environment_mgr( NULL ),
|
||||||
|
ATC_mgr( NULL ),
|
||||||
|
ATC_display( NULL ),
|
||||||
|
AI_mgr( NULL ),
|
||||||
|
controls( NULL ),
|
||||||
|
steam( NULL ),
|
||||||
|
viewmgr( NULL ),
|
||||||
|
props( new SGPropertyNode ),
|
||||||
|
initial_state( NULL ),
|
||||||
|
locale( NULL ),
|
||||||
|
commands( new SGCommandMgr ),
|
||||||
|
model_loader( NULL ),
|
||||||
|
texture_loader( NULL ),
|
||||||
|
acmodel( NULL ),
|
||||||
|
model_mgr( NULL ),
|
||||||
|
channel_options_list( NULL ),
|
||||||
|
scenery( NULL ),
|
||||||
|
tile_mgr( NULL ),
|
||||||
|
io( new FGIO )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue