mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
add test for being in background
This commit is contained in:
parent
5a28a7fc27
commit
410bc00d2e
1 changed files with 13 additions and 5 deletions
|
@ -809,13 +809,21 @@ curses_util_turnChanged( XW_UtilCtxt* uc, XP_S16 XP_UNUSED_DBG(newTurn) )
|
|||
#endif
|
||||
|
||||
static void
|
||||
curses_util_notifyIllegalWords( XW_UtilCtxt* uc,
|
||||
BadWordInfo* XP_UNUSED(bwi),
|
||||
XP_U16 XP_UNUSED(player),
|
||||
XP_Bool XP_UNUSED(turnLost) )
|
||||
curses_util_notifyIllegalWords( XW_UtilCtxt* uc, BadWordInfo* bwi,
|
||||
XP_U16 player, XP_Bool turnLost )
|
||||
{
|
||||
gchar* strs = g_strjoinv( "\", \"", (gchar**)bwi->words );
|
||||
gchar* msg = g_strdup_printf( "Player %d played bad word[s]: \"%s\". "
|
||||
"Turn lost: %s", player, strs, boolToStr(turnLost) );
|
||||
|
||||
CursesBoardGlobals* bGlobals = (CursesBoardGlobals*)uc->closure;
|
||||
ca_informf( bGlobals->boardWin, "%s() not implemented", __func__ );
|
||||
if ( !!bGlobals->boardWin ) {
|
||||
ca_inform( bGlobals->boardWin, msg );
|
||||
} else {
|
||||
XP_LOGFF( "msg: %s", msg );
|
||||
}
|
||||
g_free( strs );
|
||||
g_free( msg );
|
||||
} /* curses_util_notifyIllegalWord */
|
||||
|
||||
/* this needs to change!!! */
|
||||
|
|
Loading…
Reference in a new issue