Akihiro Sagawa : dsound/tests: Add a test whether the buffer is a valid global memory.

Alexandre Julliard julliard at winehq.org
Tue Jun 2 08:11:17 CDT 2020


Module: wine
Branch: stable
Commit: db754f0f18b594febee229c12e4d39810ba69b23
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=db754f0f18b594febee229c12e4d39810ba69b23

Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date:   Fri Mar  6 21:52:44 2020 +0900

dsound/tests: Add a test whether the buffer is a valid global memory.

Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit e28638afccdfda3ee44121405d9097d201b61445)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/dsound/tests/dsound.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c
index 7fdac9144e..0e779618a2 100644
--- a/dlls/dsound/tests/dsound.c
+++ b/dlls/dsound/tests/dsound.c
@@ -1157,6 +1157,13 @@ static HRESULT test_duplicate(LPGUID lpGuid)
             ok(rc==DS_OK && buf!=NULL,
                "IDirectSoundBuffer_Lock failed to lock the buffer %08x\n",rc);
             if (rc==DS_OK && buf!=NULL) {
+                if (sizeof(void*)==4) { /* crashes on 64-bit */
+                    /* broken apps like Asuka 120% Return BURNING Fest,
+                       pass the pointer to GlobalHandle. */
+                    HGLOBAL hmem = GlobalHandle(buf);
+                    todo_wine ok(!hmem,"GlobalHandle should return NULL "
+                       "for buffer %p, got %p\n",buf,hmem);
+                }
                 ZeroMemory(buf,bufsize);
                 rc=IDirectSoundBuffer_Unlock(original,buf,bufsize,
                                              NULL,0);




More information about the wine-cvs mailing list