mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-06 20:45:54 +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.
|
/* here's where we want to behave differently if there's saved state.
|
||||||
But that's a long ways off. */
|
But that's a long ways off. */
|
||||||
prevStateExists = ceLoadPrefs( globals );
|
prevStateExists = ceLoadPrefs( globals );
|
||||||
if ( prevStateExists && ceLoadSavedGame( globals ) ) {
|
if ( !prevStateExists ) {
|
||||||
oldGameLoaded = XP_TRUE;
|
|
||||||
/* nothing to do? */
|
|
||||||
} else {
|
|
||||||
ceInitPrefs( globals );
|
ceInitPrefs( globals );
|
||||||
oldGameLoaded = XP_FALSE;
|
|
||||||
}
|
}
|
||||||
|
/* must load prefs before creating draw ctxt */
|
||||||
globals->draw = ce_drawctxt_make( MPPARM(globals->mpool)
|
globals->draw = ce_drawctxt_make( MPPARM(globals->mpool)
|
||||||
hWnd, globals );
|
hWnd, globals );
|
||||||
|
|
||||||
|
oldGameLoaded = prevStateExists && ceLoadSavedGame( globals );
|
||||||
|
|
||||||
if ( !oldGameLoaded ) {
|
if ( !oldGameLoaded ) {
|
||||||
game_makeNewGame( MPPARM(mpool) &globals->game, &globals->gameInfo,
|
game_makeNewGame( MPPARM(mpool) &globals->game, &globals->gameInfo,
|
||||||
&globals->util, globals->draw, &globals->appPrefs.cp,
|
&globals->util, globals->draw, &globals->appPrefs.cp,
|
||||||
|
|
Loading…
Add table
Reference in a new issue