mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
Add "Save current game as" to save file dialog; remove frequent-save hack.
This commit is contained in:
parent
1af17b7672
commit
73c0cefb52
1 changed files with 2 additions and 23 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue