diff --git a/xwords4/wince/Makefile b/xwords4/wince/Makefile index a369a2c09..850510c61 100644 --- a/xwords4/wince/Makefile +++ b/xwords4/wince/Makefile @@ -36,7 +36,7 @@ LFLAGS += -Wl,--major-subsystem-version,4,--minor-subsystem-version,20 ifdef HAVE_COMMCTRL CELIBS += -lcommctrl -laygshell else -CFLAGS += -DCANT_DO_CMDBAR -DCANT_DO_SHELL_THING -DBEYOND_IR +CFLAGS += -DCANT_DO_CMDBAR -DBEYOND_IR endif else ifeq ($(TARGET_OS),win32) @@ -45,7 +45,7 @@ WINDRES = i586-mingw32msvc-windres STRIP = i586-mingw32msvc-strip TARGET_OS_DEF = -DTARGET_OS_WIN32 CELIBS += -lws2_32 -CFLAGS += -DCANT_DO_CMDBAR -DCANT_DO_SHELL_THING -DBEYOND_IR +CFLAGS += -DCANT_DO_CMDBAR -DBEYOND_IR endif endif @@ -58,7 +58,7 @@ CFLAGS += -g -DDEBUG_TS OBJDIR = obj_$(TARGET_OS)_dbg else CFLAGS += -Os -OBJDIR = obj_$(TARGET_OS) +OBJDIR = obj_$(TARGET_OS)_rel endif TARGET = $(OBJDIR)/xwords4.exe diff --git a/xwords4/wince/cemain.c b/xwords4/wince/cemain.c index d0ecdf89b..aaded6aa2 100755 --- a/xwords4/wince/cemain.c +++ b/xwords4/wince/cemain.c @@ -25,7 +25,7 @@ #include #include #include -#ifndef CANT_DO_SHELL_THING +#ifdef _WIN32_WCE # include #endif #include "strutils.h" @@ -239,6 +239,7 @@ MyRegisterClass(HINSTANCE hInstance, LPTSTR szWindowClass) return RegisterClass(&wc); } +#ifdef _WIN32_WCE #define N_TOOLBAR_BUTTONS 4 static void addButtonsToCmdBar( CEAppGlobals* globals ) @@ -260,8 +261,6 @@ addButtonsToCmdBar( CEAppGlobals* globals ) -1 }; -#ifndef CANT_DO_CMDBAR -#ifdef TARGET_OS_WINCE for ( i = 0; i < sizeof(cmds)/sizeof(cmds[0]); ++i ) { index = CommandBar_AddBitmap(globals->hwndCB, globals->hInst, resIDs[i], 1, 16, 16 ); @@ -270,9 +269,8 @@ addButtonsToCmdBar( CEAppGlobals* globals ) success = CommandBar_InsertButton( globals->hwndCB, -1, (LPARAM)&buttData ); } -#endif -#endif } /* addButtonsToCmdBar */ +#endif static void ceInitUtilFuncs( CEAppGlobals* globals ) @@ -1011,12 +1009,10 @@ InitInstance(HINSTANCE hInstance, int nCmdShow) ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); -#ifndef CANT_DO_CMDBAR -#ifdef TARGET_OS_WINCE +#ifdef _WIN32_WCE if (globals->hwndCB) { CommandBar_Show(globals->hwndCB, TRUE); } -#endif #endif if ( result && !newDone ) { ceInitAndStartBoard( globals, !oldGameLoaded, NULL, NULL ); @@ -1461,7 +1457,7 @@ ceConfirmAndSave( CEAppGlobals* globals ) static HWND makeCommandBar( HWND hwnd, HINSTANCE hInst ) { -#ifndef CANT_DO_SHELL_THING +#ifdef _WIN32_WCE SHMENUBARINFO mbi; XP_MEMSET( &mbi, 0, sizeof(mbi) ); @@ -1589,7 +1585,7 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) addButtonsToCmdBar( globals ); #endif -#ifndef CANT_DO_SHELL_THING +#ifdef _WIN32_WCE globals->sai.cbSize = sizeof(globals->sai); #endif } else { @@ -1597,7 +1593,7 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) switch (message) { -#ifndef CANT_DO_SHELL_THING +#ifdef _WIN32_WCE case WM_ACTIVATE: // Notify shell of our activate message SHHandleWMActivate( hWnd, wParam, lParam, &globals->sai, FALSE ); @@ -1605,7 +1601,7 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) #endif case WM_SETTINGCHANGE: -#ifndef CANT_DO_SHELL_THING +#ifdef _WIN32_WCE SHHandleWMSettingChange( hWnd, wParam, lParam, &globals->sai ); #endif cePositionBoard( globals ); @@ -1811,10 +1807,8 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) break; case WM_DESTROY: -#ifndef CANT_DO_CMDBAR -#ifdef TARGET_OS_WINCE +#ifdef _WIN32_WCE CommandBar_Destroy(globals->hwndCB); /* supposedly not needed */ -#endif #endif PostQuitMessage(0); break; @@ -2127,9 +2121,6 @@ ce_send_on_close( XWStreamCtxt* stream, void* closure ) #endif -/* I can't believe the stupid compiler's making me implement this */ -void p_ignore(XP_UCHAR* c, ...){} - static VTableMgr* ce_util_getVTManager( XW_UtilCtxt* uc ) { diff --git a/xwords4/wince/cemain.h b/xwords4/wince/cemain.h index cdba63eee..e50ede2f2 100755 --- a/xwords4/wince/cemain.h +++ b/xwords4/wince/cemain.h @@ -20,7 +20,7 @@ #ifndef _CEMAIN_H_ #define _CEMAIN_H_ -#ifndef CANT_DO_SHELL_THING +#ifdef _WIN32_WCE # include #endif #include "draw.h" @@ -68,7 +68,7 @@ typedef struct CEAppGlobals { HWND buttons[NUM_BUTTONS]; -#ifndef CANT_DO_SHELL_THING +#ifdef _WIN32_WCE SHACTIVATEINFO sai; #endif