From 73c0cefb52bd184039bcb67737596f886cf61209 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sun, 11 Jun 2006 05:27:16 +0000 Subject: [PATCH] Add "Save current game as" to save file dialog; remove frequent-save hack. --- xwords4/wince/cemain.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/xwords4/wince/cemain.c b/xwords4/wince/cemain.c index d346e2a3a..e4e00b8f4 100755 --- a/xwords4/wince/cemain.c +++ b/xwords4/wince/cemain.c @@ -64,11 +64,6 @@ #define SCROLLBAR_WIDTH 12 #define SCROLLBARID 0x4321 /* needs to be unique! */ -/* CE_DEBUG_SAVEOFTEN: Temporary hack to attempt to get a reproducible case - * of the lockup folks are seeing on WM 2003 SE devices. - */ -#define CE_DEBUG_SAVEOFTEN - #ifdef MEM_DEBUG # define MEMPOOL globals->mpool, #else @@ -1595,7 +1590,8 @@ ceSaveCurGame( CEAppGlobals* globals, XP_Bool autoSave ) sfs.lpstrDefExt = L"xwg"; - // sfs.lpstrTitle: doesn't work + // sfs.lpstrTitle didn't work in earlier PPC OSes, but does now + sfs.lpstrTitle = L"Save current game as"; // sfs.lpstrInitialDir: doesn't either confirmed = GetSaveFileName( &sfs ); @@ -1641,10 +1637,8 @@ ceSaveCurGame( CEAppGlobals* globals, XP_Bool autoSave ) fwState.path = globals->curGameName; fwState.globals = globals; -#ifndef CE_DEBUG_SAVEOFTEN board_hideTray( globals->game.board ); /* so won't be visible when next opened */ -#endif memStream = mem_stream_make( MEMPOOL globals->vtMgr, &fwState, 0, ceWriteToFile ); stream_open( memStream ); @@ -1787,17 +1781,6 @@ handleScroll( CEAppGlobals* globals, XP_S16 pos, /* only valid for THUMB* */ } /* handleScroll */ #endif -#ifdef CE_DEBUG_SAVEOFTEN -static void -debug_saveCurState( CEAppGlobals* globals ) -{ - ceSaveCurGame( globals, XP_TRUE ); - ceSavePrefs( globals ); -} -#else -# define debug_saveCurState(g) -#endif - static void ceFireTimer( CEAppGlobals* globals, XWTimerReason why ) { @@ -2023,7 +2006,6 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) globals->penDown = XP_TRUE; draw = board_handlePenDown( globals->game.board, LOWORD(lParam), HIWORD(lParam), &handled ); - debug_saveCurState( globals ); break; case WM_MOUSEMOVE: @@ -2031,7 +2013,6 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) draw = board_handlePenMove( globals->game.board, LOWORD(lParam), HIWORD(lParam) ); - debug_saveCurState( globals ); } break; @@ -2040,7 +2021,6 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) draw = board_handlePenUp( globals->game.board, LOWORD(lParam), HIWORD(lParam), 0 ); globals->penDown = XP_FALSE; - debug_saveCurState( globals ); } break; @@ -2050,7 +2030,6 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } draw = board_handleKey( globals->game.board, wParam ) || board_handleKey( globals->game.board, wParam - ('a'-'A') ); - debug_saveCurState( globals ); break; case WM_TIMER: