mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
mmsystem.dll16-MIDIHDR_Refcount: Fix warnings caused by implicit casts from int to pointer.
This commit is contained in:
parent
22ca9a3c6a
commit
7a99b50694
@ -1,4 +1,4 @@
|
||||
From 777db4a5e0c6058253b471640c9ae6dbf0e159da Mon Sep 17 00:00:00 2001
|
||||
From eda32948987d81c0df777fbe997b2ce8eaa4cbd1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 26 Feb 2016 03:54:28 +0100
|
||||
Subject: mmsystem.dll16: Refcount midihdr to work around buggy application
|
||||
@ -9,7 +9,7 @@ Subject: mmsystem.dll16: Refcount midihdr to work around buggy application
|
||||
1 file changed, 73 insertions(+), 48 deletions(-)
|
||||
|
||||
diff --git a/dlls/mmsystem.dll16/message16.c b/dlls/mmsystem.dll16/message16.c
|
||||
index 012d3dc..e0df741 100644
|
||||
index 012d3dc..26e47b2 100644
|
||||
--- a/dlls/mmsystem.dll16/message16.c
|
||||
+++ b/dlls/mmsystem.dll16/message16.c
|
||||
@@ -33,6 +33,13 @@
|
||||
@ -33,7 +33,7 @@ index 012d3dc..e0df741 100644
|
||||
- LPMIDIHDR mh32 = (LPMIDIHDR)(*dwParam1);
|
||||
- SEGPTR segmh16 = *(SEGPTR*)((LPSTR)mh32 - sizeof(LPMIDIHDR));
|
||||
- LPMIDIHDR16 mh16 = MapSL(segmh16);
|
||||
+ struct mihdrWrap *mh32 = CONTAINING_RECORD(*dwParam1, struct mihdrWrap, hdr);
|
||||
+ struct mihdrWrap *mh32 = CONTAINING_RECORD((MIDIHDR *)*dwParam1, struct mihdrWrap, hdr);
|
||||
+ SEGPTR segmh16 = mh32->mh16;
|
||||
+ LPMIDIHDR16 mh16 = MapSL(segmh16);
|
||||
|
||||
@ -129,7 +129,7 @@ index 012d3dc..e0df741 100644
|
||||
{
|
||||
- LPMIDIHDR mh32 = (LPMIDIHDR)(*lpParam1);
|
||||
- LPMIDIHDR16 mh16 = MapSL(*(SEGPTR*)((LPSTR)mh32 - sizeof(LPMIDIHDR)));
|
||||
+ struct mihdrWrap *mh32 = CONTAINING_RECORD(*lpParam1, struct mihdrWrap, hdr);
|
||||
+ struct mihdrWrap *mh32 = CONTAINING_RECORD((MIDIHDR *)*lpParam1, struct mihdrWrap, hdr);
|
||||
+ LPMIDIHDR16 mh16;
|
||||
|
||||
- assert((MIDIHDR*)mh16->lpNext == mh32);
|
||||
@ -168,7 +168,7 @@ index 012d3dc..e0df741 100644
|
||||
- LPMIDIHDR mh32 = (LPMIDIHDR)(*dwParam1);
|
||||
- SEGPTR segmh16 = *(SEGPTR*)((LPSTR)mh32 - sizeof(LPMIDIHDR));
|
||||
- LPMIDIHDR16 mh16 = MapSL(segmh16);
|
||||
+ struct mihdrWrap *mh32 = CONTAINING_RECORD(*dwParam1, struct mihdrWrap, hdr);
|
||||
+ struct mihdrWrap *mh32 = CONTAINING_RECORD((MIDIHDR *)*dwParam1, struct mihdrWrap, hdr);
|
||||
+ SEGPTR segmh16 = mh32->mh16;
|
||||
+ LPMIDIHDR16 mh16 = MapSL(segmh16);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 23a789f7364648c706fc14a5558de028016f7b42 Mon Sep 17 00:00:00 2001
|
||||
From e741e408304cd80852ec392fe491f1cde403e283 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 26 Feb 2016 04:04:12 +0100
|
||||
Subject: mmsystem.dll16: Translate MidiIn messages.
|
||||
@ -8,7 +8,7 @@ Subject: mmsystem.dll16: Translate MidiIn messages.
|
||||
1 file changed, 126 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/mmsystem.dll16/message16.c b/dlls/mmsystem.dll16/message16.c
|
||||
index e0df741..f7125da 100644
|
||||
index 26e47b2..05a1995 100644
|
||||
--- a/dlls/mmsystem.dll16/message16.c
|
||||
+++ b/dlls/mmsystem.dll16/message16.c
|
||||
@@ -95,7 +95,78 @@ static void MMSYSTDRV_Mixer_MapCB(DWORD uMsg, DWORD_PTR* dwUser
|
||||
@ -124,7 +124,7 @@ index e0df741..f7125da 100644
|
||||
+ case MIDM_PREPARE:
|
||||
+ case MIDM_UNPREPARE:
|
||||
+ {
|
||||
+ struct mihdrWrap *mh32 = CONTAINING_RECORD(*lpParam1, struct mihdrWrap, hdr);
|
||||
+ struct mihdrWrap *mh32 = CONTAINING_RECORD((MIDIHDR *)*lpParam1, struct mihdrWrap, hdr);
|
||||
+ LPMIDIHDR16 mh16;
|
||||
+
|
||||
+ if (mh32->mh16)
|
||||
|
Loading…
Reference in New Issue
Block a user