init prefs before dctx, and dcxt before game

This commit is contained in:
ehouse 2004-04-03 16:39:18 +00:00
parent 58160fe160
commit 6a8320e504

View file

@ -732,16 +732,15 @@ InitInstance(HINSTANCE hInstance, int nCmdShow)
/* here's where we want to behave differently if there's saved state.
But that's a long ways off. */
prevStateExists = ceLoadPrefs( globals );
if ( prevStateExists && ceLoadSavedGame( globals ) ) {
oldGameLoaded = XP_TRUE;
/* nothing to do? */
} else {
if ( !prevStateExists ) {
ceInitPrefs( globals );
oldGameLoaded = XP_FALSE;
}
/* must load prefs before creating draw ctxt */
globals->draw = ce_drawctxt_make( MPPARM(globals->mpool)
hWnd, globals );
oldGameLoaded = prevStateExists && ceLoadSavedGame( globals );
if ( !oldGameLoaded ) {
game_makeNewGame( MPPARM(mpool) &globals->game, &globals->gameInfo,
&globals->util, globals->draw, &globals->appPrefs.cp,