mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
init prefs before dctx, and dcxt before game
This commit is contained in:
parent
58160fe160
commit
6a8320e504
1 changed files with 4 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue