Andrey Semakin : winemine: Save board without need to correctly finish the app.
Module: wine Branch: master Commit: 1392ab11122848de566424a6fee589d653237f3d URL: http://source.winehq.org/git/wine.git/?a=commit;h=1392ab11122848de566424a6fe... Author: Andrey Semakin <and-semakin(a)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(a)ya.ru> Signed-off-by: Alexandre Julliard <julliard(a)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); }
participants (1)
-
Alexandre Julliard