Eric Pouech : winmm: Duplicate the 16<> 32 time struct conversion functions in both DLLs.

Alexandre Julliard julliard at winehq.org
Fri Oct 23 10:19:04 CDT 2009


Module: wine
Branch: master
Commit: 9709d1c67f09c5f9541b0cc12a8a31731a081799
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9709d1c67f09c5f9541b0cc12a8a31731a081799

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Thu Oct 22 22:10:54 2009 +0200

winmm: Duplicate the 16<>32 time struct conversion functions in both DLLs.

---

 dlls/winmm/message16.c |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/dlls/winmm/message16.c b/dlls/winmm/message16.c
index d13190e..0193683 100644
--- a/dlls/winmm/message16.c
+++ b/dlls/winmm/message16.c
@@ -33,6 +33,19 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(winmm);
 
+/******************************************************************
+ *		WINMM_MMTIME16to32
+ */
+static void WINMM_MMTIME16to32(LPMMTIME mmt32, const MMTIME16* mmt16)
+{
+    mmt32->wType = mmt16->wType;
+    /* layout of rest is the same for 32/16,
+     * Note: mmt16->u is 2 bytes smaller than mmt32->u, which has padding
+     */
+    memcpy(&(mmt32->u), &(mmt16->u), sizeof(mmt16->u));
+}
+
+
 /**************************************************************************
  * 				MMDRV_Callback			[internal]
  */
@@ -1165,7 +1178,7 @@ static  WINMM_MapType	MMDRV_WaveIn_UnMap32WTo16(UINT wMsg, DWORD_PTR *lpdwUser,
 	    LPSTR		ptr   = (LPSTR)mmt16 - sizeof(LPMMTIME);
             LPMMTIME		mmt32 = *(LPMMTIME*)ptr;
 
-	    MMSYSTEM_MMTIME16to32(mmt32, mmt16);
+	    WINMM_MMTIME16to32(mmt32, mmt16);
             UnMapLS( *lpParam1 );
             HeapFree( GetProcessHeap(), 0, ptr );
 	    ret = WINMM_MAP_OK;
@@ -1689,7 +1702,7 @@ static  WINMM_MapType	MMDRV_WaveOut_UnMap32WTo16(UINT wMsg, DWORD_PTR *lpdwUser,
 	    LPSTR		ptr   = (LPSTR)mmt16 - sizeof(LPMMTIME);
             LPMMTIME		mmt32 = *(LPMMTIME*)ptr;
 
-	    MMSYSTEM_MMTIME16to32(mmt32, mmt16);
+	    WINMM_MMTIME16to32(mmt32, mmt16);
             UnMapLS( *lpParam1 );
             HeapFree( GetProcessHeap(), 0, ptr );
 	    ret = WINMM_MAP_OK;




More information about the wine-cvs mailing list