- let all time related functions make use of low level drivers 16 bit

functions
- some renaming (prefixing internal time functions with TIME)
This commit is contained in:
Eric Pouech 2002-10-29 21:59:24 +00:00 committed by Alexandre Julliard
parent 5942f98f92
commit 8b7a45f4f7
3 changed files with 12 additions and 26 deletions

View File

@ -2461,8 +2461,8 @@ MMRESULT16 WINAPI timeSetEvent16(UINT16 wDelay, UINT16 wResol, LPTIMECALLBACK16
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);
}
/**************************************************************************

View File

@ -52,10 +52,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mmtime);
#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 @@ static void TIME_TriggerCallBack(LPWINE_TIMERENTRY lpTimer)
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 @@ static DWORD CALLBACK TIME_MMSysTimeThread(LPVOID arg)
*/
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 @@ void TIME_MMTimeStart(void)
WINMM_IData->lpTimerList = NULL;
WINMM_IData->hMMTimer = CreateThread(NULL, 0, TIME_MMSysTimeThread, WINMM_IData, 0, NULL);
}
}
/**************************************************************************
@ -199,10 +190,6 @@ void TIME_MMTimeStart(void)
*/
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 @@ MMRESULT WINAPI timeGetSystemTime(LPMMTIME lpTime, UINT wSize)
}
/**************************************************************************
* 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 @@ MMRESULT WINAPI timeSetEvent(UINT wDelay, UINT wResol, LPTIMECALLBACK lpFunc,
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);
}
/**************************************************************************

View File

@ -275,9 +275,6 @@ UINT MMSYSTEM_waveOpen(HANDLE* lphndl, UINT uDeviceID, UINT uType,
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 @@ LPWINE_MMIO MMIO_Get(HMMIO h);
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);