From 4c730be669b75b7b308ad9a893a1822fab3bb483 Mon Sep 17 00:00:00 2001 From: ehouse Date: Wed, 27 Feb 2008 05:43:27 +0000 Subject: [PATCH] make new turnChanged notification compile-time conditional --- xwords4/common/util.h | 9 +++++++-- xwords4/wince/Makefile | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/xwords4/common/util.h b/xwords4/common/util.h index 112974530..4a30ae92f 100644 --- a/xwords4/common/util.h +++ b/xwords4/common/util.h @@ -124,8 +124,9 @@ typedef struct UtilVtable { XP_U16 nVisibleRows ); void (*m_util_yOffsetChange)(XW_UtilCtxt* uc, XP_U16 oldOffset, XP_U16 newOffset ); +#ifdef XWFEATURE_TURNCHANGENOTIFY void (*m_util_turnChanged)(XW_UtilCtxt* uc); - +#endif void (*m_util_notifyGameOver)( XW_UtilCtxt* uc ); XP_Bool (*m_util_hiliteCell)( XW_UtilCtxt* uc, XP_U16 col, XP_U16 row ); @@ -199,8 +200,12 @@ struct XW_UtilCtxt { #define util_yOffsetChange( uc, o, n ) \ (uc)->vtable->m_util_yOffsetChange((uc), (o), (n) ) -#define util_turnChanged( uc ) \ +#ifdef XWFEATURE_TURNCHANGENOTIFY +# define util_turnChanged( uc ) \ (uc)->vtable->m_util_turnChanged((uc) ) +#else +# define util_turnChanged( uc ) +#endif #define util_notifyGameOver( uc ) \ (uc)->vtable->m_util_notifyGameOver((uc)) diff --git a/xwords4/wince/Makefile b/xwords4/wince/Makefile index 1be7d64dd..ffaf28074 100644 --- a/xwords4/wince/Makefile +++ b/xwords4/wince/Makefile @@ -58,6 +58,7 @@ TARGET_OS_DEF = -DTARGET_OS_WINCE STANDALONE = -DXWFEATURE_STANDALONE_ONLY CFLAGS += -D_WIN32_WCE=400 -D_WIN32_IE=0x0400 -DUNDER_CE -DMY_COLOR_SEL \ $(STANDALONE) $(USE_RAW_MINGW) -DDRAW_LINK_DIRECT \ + -DXWFEATURE_TURNCHANGENOTIFY \ -fdollars-in-identifiers -D__W32API_USE_DLLIMPORT__ RESFLAGS += -DMY_COLOR_SEL -D_WIN32_WCE=400 LFLAGS += -Wl,--major-subsystem-version,4,--minor-subsystem-version,20 @@ -76,7 +77,7 @@ WINDRES = i586-mingw32msvc-windres STRIP = i586-mingw32msvc-strip TARGET_OS_DEF = -DTARGET_OS_WIN32 CELIBS += -lws2_32 -CFLAGS += -DCANT_DO_CMDBAR -DDRAW_LINK_DIRECT +CFLAGS += -DCANT_DO_CMDBAR -DDRAW_LINK_DIRECT -DXWFEATURE_TURNCHANGENOTIFY #CFLAGS += -DFORCE_HEIGHT=240 -DFORCE_WIDTH=320 endif endif