https://git.reactos.org/?p=reactos.git;a=commitdiff;h=29c0e23fd4a5de8ae15b9…
commit 29c0e23fd4a5de8ae15b9f0efecf7f2833c30761
Author: Joachim Henze <joachim.henze(a)reactos.org>
AuthorDate: Wed Sep 27 19:37:44 2023 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Sep 27 17:37:44 2023 +0000
[MAZESCR] Avoid (DLGPROC) cast, fix a typo (#5694)
May help a bit with x64.
Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
---
modules/rosapps/applications/screensavers/mazescr/maze.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/modules/rosapps/applications/screensavers/mazescr/maze.c
b/modules/rosapps/applications/screensavers/mazescr/maze.c
index 1b1ed42340b..bff5bdd63a6 100644
--- a/modules/rosapps/applications/screensavers/mazescr/maze.c
+++ b/modules/rosapps/applications/screensavers/mazescr/maze.c
@@ -632,7 +632,7 @@ static BOOL OnCreate(HWND hWnd, LPCREATESTRUCT lpCreateStruct)
return TRUE;
}
-BOOL WINAPI AboutProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
+INT_PTR CALLBACK AboutProc(HWND hWnd, UINT message, WPARAM wparam, LPARAM lparam)
{
switch(message){
case WM_COMMAND:
@@ -684,7 +684,6 @@ LRESULT CALLBACK ScreenSaverProc(
start_timer(hWnd, solve_delay);
break;
-
case 3:
if (!solve_maze(hWnd))
{
@@ -696,7 +695,6 @@ LRESULT CALLBACK ScreenSaverProc(
start_timer(hWnd, post_solve_delay);
}
break;
-
default:
initialize_maze();
@@ -711,14 +709,12 @@ LRESULT CALLBACK ScreenSaverProc(
break;
}
break;
-
case WM_DESTROY: // message: window being destroyed
DeleteObject(hBrushLiving);
DeleteObject(hBrushDead);
ReleaseDC(hWnd, hDC);
break;
-
- default: // Passes it on if unproccessed
+ default: // Passes it on if unprocessed
return DefScreenSaverProc(hWnd, message, wParam, lParam);
}
return 0;
@@ -757,7 +753,7 @@ BOOL WINAPI ScreenSaverConfigureDialog(HWND hWnd, UINT message, WPARAM
wparam, L
EndDialog(hWnd, TRUE);
break;
case IDABOUT:
- DialogBox(hMainInstance, MAKEINTRESOURCE(IDD_DLG_ABOUT), hWnd,
(DLGPROC)AboutProc);
+ DialogBox(hMainInstance, MAKEINTRESOURCE(IDD_DLG_ABOUT), hWnd,
AboutProc);
break;
}
case WM_HSCROLL: