winmm 16/32 split (#13)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ChangeLog:
- let all time related functions make use of low level drivers 16 bit
functions
- some renaming (prefixing internal time functions with TIME)

Note: 
- the time interface should in fact be handled by the lolvldrv part, but
this is not implemented yet
- we could in fact provide our own timer provider

A+
--- winmm_12/mmsystem.c	Tue Oct 29 14:20:31 2002
+++ winmm_13/mmsystem.c	Tue Oct 29 14:20:42 2002
@@ -2461,8 +2461,8 @@
     if (wFlags & WINE_TIMER_IS32)
 	WARN("Unknown windows flag... wine internally used.. ooch\n");
 
-    return timeSetEventInternal(wDelay, wResol, (FARPROC16)lpFunc,
-				dwUser, wFlags & ~WINE_TIMER_IS32);
+    return TIME_SetEventInternal(wDelay, wResol, (FARPROC16)lpFunc,
+                                 dwUser, wFlags & ~WINE_TIMER_IS32);
 }
 
 /**************************************************************************
--- winmm_12/time.c	Sat Oct 26 15:06:40 2002
+++ winmm_13/time.c	Tue Oct 29 14:11:58 2002
@@ -52,10 +52,6 @@
 
 #define MMSYSTIME_STDINTERVAL (10) /* reasonable value? */
 
-/* ### start build ### */
-extern WORD CALLBACK TIME_CallTo16_word_wwlll(FARPROC16,WORD,WORD,LONG,LONG,LONG);
-/* ### stop build ### */
-
 static	void	TIME_TriggerCallBack(LPWINE_TIMERENTRY lpTimer)
 {
     TRACE("before CallBack => lpFunc=%p wTimerID=%04X dwUser=%08lX !\n",
@@ -70,9 +66,9 @@
     case TIME_CALLBACK_FUNCTION:
 	if (lpTimer->wFlags & WINE_TIMER_IS32)
 	    ((LPTIMECALLBACK)lpTimer->lpFunc)(lpTimer->wTimerID, 0, lpTimer->dwUser, 0, 0);
-	else
-	    TIME_CallTo16_word_wwlll(lpTimer->lpFunc, lpTimer->wTimerID, 0,
-				     lpTimer->dwUser, 0, 0);
+	else if (pFnCallMMDrvFunc16)
+	    pFnCallMMDrvFunc16(lpTimer->lpFunc, lpTimer->wTimerID, 0,
+                               lpTimer->dwUser, 0, 0);
 	break;
     case TIME_CALLBACK_EVENT_SET:
 	SetEvent((HANDLE)lpTimer->lpFunc);
@@ -178,10 +174,6 @@
  */
 void	TIME_MMTimeStart(void)
 {
-    if (IsBadWritePtr(WINMM_IData, sizeof(WINE_MM_IDATA))) {
-	ERR("iData is not correctly set, please report. Expect failure.\n");
-	return;
-    }
     /* one could think it's possible to stop the service thread activity when no more
      * mm timers are active, but this would require to keep mmSysTimeMS up-to-date
      * without being incremented within the service thread callback.
@@ -191,7 +183,6 @@
 	WINMM_IData->lpTimerList = NULL;
 	WINMM_IData->hMMTimer = CreateThread(NULL, 0, TIME_MMSysTimeThread, WINMM_IData, 0, NULL);
     }
-
 }
 
 /**************************************************************************
@@ -199,10 +190,6 @@
  */
 void	TIME_MMTimeStop(void)
 {
-    if (IsBadWritePtr(WINMM_IData, sizeof(WINE_MM_IDATA))) {
-	ERR("WINMM_IData is not correctly set, please report. Expect failure.\n");
-	return;
-    }
     if (WINMM_IData->hMMTimer) {
 	HANDLE hMMTimer = WINMM_IData->hMMTimer;
 	WINMM_IData->hMMTimer = 0;
@@ -230,10 +217,10 @@
 }
 
 /**************************************************************************
- * 				timeSetEventInternal	[internal]
+ * 				TIME_SetEventInternal	[internal]
  */
-WORD	timeSetEventInternal(UINT wDelay, UINT wResol,
-                             FARPROC16 lpFunc, DWORD dwUser, UINT wFlags)
+WORD	TIME_SetEventInternal(UINT wDelay, UINT wResol,
+                              FARPROC16 lpFunc, DWORD dwUser, UINT wFlags)
 {
     WORD 		wNewID = 0;
     LPWINE_TIMERENTRY	lpNewTimer;
@@ -283,8 +270,8 @@
     if (wFlags & WINE_TIMER_IS32)
 	WARN("Unknown windows flag... wine internally used.. ooch\n");
 
-    return timeSetEventInternal(wDelay, wResol, (FARPROC16)lpFunc,
-				dwUser, wFlags|WINE_TIMER_IS32);
+    return TIME_SetEventInternal(wDelay, wResol, (FARPROC16)lpFunc,
+                                 dwUser, wFlags|WINE_TIMER_IS32);
 }
 
 /**************************************************************************
--- winmm_12/winemm.h	Tue Oct 29 16:09:41 2002
+++ winmm_13/winemm.h	Tue Oct 29 16:09:45 2002
@@ -275,9 +275,6 @@
                                   const LPWAVEFORMATEX lpFormat, DWORD dwCallback, 
                                   DWORD dwInstance, DWORD dwFlags, BOOL bFrom32);
 
-WORD            timeSetEventInternal(UINT wDelay, UINT wResol,
-                                     FARPROC16 lpFunc, DWORD dwUser, UINT wFlags);
-
 HMMIO           MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo,
                           DWORD dwOpenFlags, enum mmioProcType type);
 LPMMIOPROC      MMIO_InstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc,
@@ -288,6 +285,8 @@
 
 BOOL            MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSound, BOOL bUnicode);
 
+WORD            TIME_SetEventInternal(UINT wDelay, UINT wResol,
+                                      FARPROC16 lpFunc, DWORD dwUser, UINT wFlags);
 void    	TIME_MMTimeStart(void);
 void		TIME_MMTimeStop(void);
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux