[PATCH v2 0/2] MR10086: comctl32/animate: Always return FALSE for ACM_OPEN with a NULL LPARAM.
-- v2: comctl32/animate: Always return FALSE for ACM_OPEN with a NULL LPARAM. https://gitlab.winehq.org/wine/wine/-/merge_requests/10086
From: Zhiyi Zhang <zzhang@codeweavers.com> --- dlls/comctl32/tests/animate.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/dlls/comctl32/tests/animate.c b/dlls/comctl32/tests/animate.c index ad7e16ace65..0b9c99fc0b8 100644 --- a/dlls/comctl32/tests/animate.c +++ b/dlls/comctl32/tests/animate.c @@ -150,6 +150,25 @@ static void test_play(void) ok(res != 0, "Load AVI resource failed\n"); res = SendMessageA(hAnimateWnd, ACM_PLAY, (WPARAM) -1, MAKELONG(0, -1)); ok(res != 0, "Play should have worked\n"); + /* Test ACM_OPEN after playing an animation */ + res = SendMessageA(hAnimateWnd, ACM_OPENA, 0, 0); + todo_wine + ok(res == 0, "ACM_OPENA with a NULL lparam while playing should return 0\n"); + destroy_animate(); + + /* Test ACM_OPEN after opening an animation */ + create_animate(0, 0); + res = SendMessageA(hAnimateWnd, ACM_OPENA, (WPARAM)shell32, MAKEINTRESOURCE(SEARCHING_AVI_INDEX)); + ok(res != 0, "Load AVI resource failed\n"); + res = SendMessageA(hAnimateWnd, ACM_OPENA, 0, 0); + todo_wine + ok(res == 0, "ACM_OPENA with a NULL lparam should return 0\n"); + destroy_animate(); + + /* Test ACM_OPEN without opening an animation */ + create_animate(0, 0); + res = SendMessageA(hAnimateWnd, ACM_OPENA, 0, 0); + ok(res == 0, "ACM_OPENA with a NULL lparam should return 0\n"); destroy_animate(); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10086
From: Zhiyi Zhang <zzhang@codeweavers.com> --- dlls/comctl32/animate.c | 2 +- dlls/comctl32/tests/animate.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c index 436faf920b4..f282bf2e4e4 100644 --- a/dlls/comctl32/animate.c +++ b/dlls/comctl32/animate.c @@ -693,7 +693,7 @@ static BOOL ANIMATE_OpenW(ANIMATE_INFO *infoPtr, HINSTANCE hInstance, LPWSTR lps { TRACE("Closing avi.\n"); /* installer of thebat! v1.62 requires FALSE here */ - return (infoPtr->hMMio != 0); + return FALSE; } if (!hInstance) diff --git a/dlls/comctl32/tests/animate.c b/dlls/comctl32/tests/animate.c index 0b9c99fc0b8..ea89a9b994b 100644 --- a/dlls/comctl32/tests/animate.c +++ b/dlls/comctl32/tests/animate.c @@ -152,7 +152,6 @@ static void test_play(void) ok(res != 0, "Play should have worked\n"); /* Test ACM_OPEN after playing an animation */ res = SendMessageA(hAnimateWnd, ACM_OPENA, 0, 0); - todo_wine ok(res == 0, "ACM_OPENA with a NULL lparam while playing should return 0\n"); destroy_animate(); @@ -161,7 +160,6 @@ static void test_play(void) res = SendMessageA(hAnimateWnd, ACM_OPENA, (WPARAM)shell32, MAKEINTRESOURCE(SEARCHING_AVI_INDEX)); ok(res != 0, "Load AVI resource failed\n"); res = SendMessageA(hAnimateWnd, ACM_OPENA, 0, 0); - todo_wine ok(res == 0, "ACM_OPENA with a NULL lparam should return 0\n"); destroy_animate(); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10086
Nikolay Sivov (@nsivov) commented about dlls/comctl32/animate.c:
{ TRACE("Closing avi.\n"); /* installer of thebat! v1.62 requires FALSE here */ - return (infoPtr->hMMio != 0); + return FALSE; }
Maybe we should reset hMMio in ANIMATE_Free? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10086#note_129519
participants (3)
-
Nikolay Sivov (@nsivov) -
Zhiyi Zhang -
Zhiyi Zhang (@zhiyi)