Andrey Semakin : winemine: Save board without need to correctly finish the app.
Alexandre Julliard
julliard at winehq.org
Tue Jan 2 15:01:28 CST 2018
Module: wine
Branch: stable
Commit: 89e62aca1d919d175c8b2db378e361feee7d000b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=89e62aca1d919d175c8b2db378e361feee7d000b
Author: Andrey Semakin <and-semakin at ya.ru>
Date: Mon Nov 6 14:23:19 2017 +0500
winemine: Save board without need to correctly finish the app.
Thus player will never lose his best time even if app crashes.
Signed-off-by: Andrey Semakin <and-semakin at ya.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 1392ab11122848de566424a6fee589d653237f3d)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
programs/winemine/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/programs/winemine/main.c b/programs/winemine/main.c
index c7d4925..d8201b3 100644
--- a/programs/winemine/main.c
+++ b/programs/winemine/main.c
@@ -178,6 +178,8 @@ static void SaveBoard( BOARD *p_board )
RegSetValueExW( hkey, key_name, 0, REG_DWORD, (LPBYTE) &p_board->best_time[i], sizeof(p_board->best_time[i]) );
}
RegCloseKey( hkey );
+
+ WINE_TRACE("Board has been saved.\n");
}
static void DestroyBoard( BOARD *p_board )
@@ -823,6 +825,7 @@ static void TestBoard( HWND hWnd, BOARD *p_board, int x, int y, int msg )
DialogBoxParamW( p_board->hInst, MAKEINTRESOURCEW(DLG_CONGRATS), hWnd,
CongratsDlgProc, (LPARAM) p_board);
+ SaveBoard( p_board );
DialogBoxParamW( p_board->hInst, MAKEINTRESOURCEW(DLG_TIMES), hWnd,
TimesDlgProc, (LPARAM) p_board);
}
More information about the wine-cvs
mailing list