only push menu when opening game to display it

This commit is contained in:
Eric House 2020-01-30 21:32:37 -08:00
parent e9882b45da
commit c44268290f

View file

@ -81,6 +81,7 @@ static void enableDraw( CursesBoardGlobals* bGlobals, const cb_dims* dims );
static CursesBoardGlobals* ref( CursesBoardGlobals* bGlobals ); static CursesBoardGlobals* ref( CursesBoardGlobals* bGlobals );
static void unref( CursesBoardGlobals* bGlobals ); static void unref( CursesBoardGlobals* bGlobals );
static void setupBoard( CursesBoardGlobals* bGlobals ); static void setupBoard( CursesBoardGlobals* bGlobals );
static void initMenus( CursesBoardGlobals* bGlobals );
CursesBoardState* CursesBoardState*
cb_init( CursesAppGlobals* aGlobals, LaunchParams* params, cb_init( CursesAppGlobals* aGlobals, LaunchParams* params,
@ -99,6 +100,7 @@ cb_open( CursesBoardState* cbState, sqlite3_int64 rowid, const cb_dims* dims )
{ {
LOG_FUNC(); LOG_FUNC();
CursesBoardGlobals* bGlobals = findOrOpen( cbState, rowid, NULL, NULL ); CursesBoardGlobals* bGlobals = findOrOpen( cbState, rowid, NULL, NULL );
initMenus( bGlobals );
enableDraw( bGlobals, dims ); enableDraw( bGlobals, dims );
setupBoard( bGlobals ); setupBoard( bGlobals );
@ -555,8 +557,6 @@ initNoDraw( CursesBoardState* cbState, sqlite3_int64 rowid,
cGlobals->cp.robotTradePct = params->robotTradePct; cGlobals->cp.robotTradePct = params->robotTradePct;
#endif #endif
initMenus( result );
if ( linuxOpenGame( cGlobals, &result->procs, addr ) ) { if ( linuxOpenGame( cGlobals, &result->procs, addr ) ) {
result = ref( result ); result = ref( result );
} else { } else {