Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
8b7a45f4
Commit
8b7a45f4
authored
Oct 29, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- let all time related functions make use of low level drivers 16 bit
functions - some renaming (prefixing internal time functions with TIME)
parent
5942f98f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
26 deletions
+12
-26
mmsystem.c
dlls/winmm/mmsystem.c
+2
-2
time.c
dlls/winmm/time.c
+8
-21
winemm.h
dlls/winmm/winemm.h
+2
-3
No files found.
dlls/winmm/mmsystem.c
View file @
8b7a45f4
...
@@ -2461,8 +2461,8 @@ MMRESULT16 WINAPI timeSetEvent16(UINT16 wDelay, UINT16 wResol, LPTIMECALLBACK16
...
@@ -2461,8 +2461,8 @@ MMRESULT16 WINAPI timeSetEvent16(UINT16 wDelay, UINT16 wResol, LPTIMECALLBACK16
if
(
wFlags
&
WINE_TIMER_IS32
)
if
(
wFlags
&
WINE_TIMER_IS32
)
WARN
(
"Unknown windows flag... wine internally used.. ooch
\n
"
);
WARN
(
"Unknown windows flag... wine internally used.. ooch
\n
"
);
return
time
SetEventInternal
(
wDelay
,
wResol
,
(
FARPROC16
)
lpFunc
,
return
TIME_
SetEventInternal
(
wDelay
,
wResol
,
(
FARPROC16
)
lpFunc
,
dwUser
,
wFlags
&
~
WINE_TIMER_IS32
);
dwUser
,
wFlags
&
~
WINE_TIMER_IS32
);
}
}
/**************************************************************************
/**************************************************************************
...
...
dlls/winmm/time.c
View file @
8b7a45f4
...
@@ -52,10 +52,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mmtime);
...
@@ -52,10 +52,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mmtime);
#define MMSYSTIME_STDINTERVAL (10)
/* reasonable value? */
#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
)
static
void
TIME_TriggerCallBack
(
LPWINE_TIMERENTRY
lpTimer
)
{
{
TRACE
(
"before CallBack => lpFunc=%p wTimerID=%04X dwUser=%08lX !
\n
"
,
TRACE
(
"before CallBack => lpFunc=%p wTimerID=%04X dwUser=%08lX !
\n
"
,
...
@@ -70,9 +66,9 @@ static void TIME_TriggerCallBack(LPWINE_TIMERENTRY lpTimer)
...
@@ -70,9 +66,9 @@ static void TIME_TriggerCallBack(LPWINE_TIMERENTRY lpTimer)
case
TIME_CALLBACK_FUNCTION
:
case
TIME_CALLBACK_FUNCTION
:
if
(
lpTimer
->
wFlags
&
WINE_TIMER_IS32
)
if
(
lpTimer
->
wFlags
&
WINE_TIMER_IS32
)
((
LPTIMECALLBACK
)
lpTimer
->
lpFunc
)(
lpTimer
->
wTimerID
,
0
,
lpTimer
->
dwUser
,
0
,
0
);
((
LPTIMECALLBACK
)
lpTimer
->
lpFunc
)(
lpTimer
->
wTimerID
,
0
,
lpTimer
->
dwUser
,
0
,
0
);
else
else
if
(
pFnCallMMDrvFunc16
)
TIME_CallTo16_word_wwlll
(
lpTimer
->
lpFunc
,
lpTimer
->
wTimerID
,
0
,
pFnCallMMDrvFunc16
(
lpTimer
->
lpFunc
,
lpTimer
->
wTimerID
,
0
,
lpTimer
->
dwUser
,
0
,
0
);
lpTimer
->
dwUser
,
0
,
0
);
break
;
break
;
case
TIME_CALLBACK_EVENT_SET
:
case
TIME_CALLBACK_EVENT_SET
:
SetEvent
((
HANDLE
)
lpTimer
->
lpFunc
);
SetEvent
((
HANDLE
)
lpTimer
->
lpFunc
);
...
@@ -178,10 +174,6 @@ static DWORD CALLBACK TIME_MMSysTimeThread(LPVOID arg)
...
@@ -178,10 +174,6 @@ static DWORD CALLBACK TIME_MMSysTimeThread(LPVOID arg)
*/
*/
void
TIME_MMTimeStart
(
void
)
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
/* 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
* mm timers are active, but this would require to keep mmSysTimeMS up-to-date
* without being incremented within the service thread callback.
* without being incremented within the service thread callback.
...
@@ -191,7 +183,6 @@ void TIME_MMTimeStart(void)
...
@@ -191,7 +183,6 @@ void TIME_MMTimeStart(void)
WINMM_IData
->
lpTimerList
=
NULL
;
WINMM_IData
->
lpTimerList
=
NULL
;
WINMM_IData
->
hMMTimer
=
CreateThread
(
NULL
,
0
,
TIME_MMSysTimeThread
,
WINMM_IData
,
0
,
NULL
);
WINMM_IData
->
hMMTimer
=
CreateThread
(
NULL
,
0
,
TIME_MMSysTimeThread
,
WINMM_IData
,
0
,
NULL
);
}
}
}
}
/**************************************************************************
/**************************************************************************
...
@@ -199,10 +190,6 @@ void TIME_MMTimeStart(void)
...
@@ -199,10 +190,6 @@ void TIME_MMTimeStart(void)
*/
*/
void
TIME_MMTimeStop
(
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
)
{
if
(
WINMM_IData
->
hMMTimer
)
{
HANDLE
hMMTimer
=
WINMM_IData
->
hMMTimer
;
HANDLE
hMMTimer
=
WINMM_IData
->
hMMTimer
;
WINMM_IData
->
hMMTimer
=
0
;
WINMM_IData
->
hMMTimer
=
0
;
...
@@ -230,10 +217,10 @@ MMRESULT WINAPI timeGetSystemTime(LPMMTIME lpTime, UINT wSize)
...
@@ -230,10 +217,10 @@ MMRESULT WINAPI timeGetSystemTime(LPMMTIME lpTime, UINT wSize)
}
}
/**************************************************************************
/**************************************************************************
*
time
SetEventInternal [internal]
*
TIME_
SetEventInternal [internal]
*/
*/
WORD
time
SetEventInternal
(
UINT
wDelay
,
UINT
wResol
,
WORD
TIME_
SetEventInternal
(
UINT
wDelay
,
UINT
wResol
,
FARPROC16
lpFunc
,
DWORD
dwUser
,
UINT
wFlags
)
FARPROC16
lpFunc
,
DWORD
dwUser
,
UINT
wFlags
)
{
{
WORD
wNewID
=
0
;
WORD
wNewID
=
0
;
LPWINE_TIMERENTRY
lpNewTimer
;
LPWINE_TIMERENTRY
lpNewTimer
;
...
@@ -283,8 +270,8 @@ MMRESULT WINAPI timeSetEvent(UINT wDelay, UINT wResol, LPTIMECALLBACK lpFunc,
...
@@ -283,8 +270,8 @@ MMRESULT WINAPI timeSetEvent(UINT wDelay, UINT wResol, LPTIMECALLBACK lpFunc,
if
(
wFlags
&
WINE_TIMER_IS32
)
if
(
wFlags
&
WINE_TIMER_IS32
)
WARN
(
"Unknown windows flag... wine internally used.. ooch
\n
"
);
WARN
(
"Unknown windows flag... wine internally used.. ooch
\n
"
);
return
time
SetEventInternal
(
wDelay
,
wResol
,
(
FARPROC16
)
lpFunc
,
return
TIME_
SetEventInternal
(
wDelay
,
wResol
,
(
FARPROC16
)
lpFunc
,
dwUser
,
wFlags
|
WINE_TIMER_IS32
);
dwUser
,
wFlags
|
WINE_TIMER_IS32
);
}
}
/**************************************************************************
/**************************************************************************
...
...
dlls/winmm/winemm.h
View file @
8b7a45f4
...
@@ -275,9 +275,6 @@ UINT MMSYSTEM_waveOpen(HANDLE* lphndl, UINT uDeviceID, UINT uType,
...
@@ -275,9 +275,6 @@ UINT MMSYSTEM_waveOpen(HANDLE* lphndl, UINT uDeviceID, UINT uType,
const
LPWAVEFORMATEX
lpFormat
,
DWORD
dwCallback
,
const
LPWAVEFORMATEX
lpFormat
,
DWORD
dwCallback
,
DWORD
dwInstance
,
DWORD
dwFlags
,
BOOL
bFrom32
);
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
,
HMMIO
MMIO_Open
(
LPSTR
szFileName
,
MMIOINFO
*
refmminfo
,
DWORD
dwOpenFlags
,
enum
mmioProcType
type
);
DWORD
dwOpenFlags
,
enum
mmioProcType
type
);
LPMMIOPROC
MMIO_InstallIOProc
(
FOURCC
fccIOProc
,
LPMMIOPROC
pIOProc
,
LPMMIOPROC
MMIO_InstallIOProc
(
FOURCC
fccIOProc
,
LPMMIOPROC
pIOProc
,
...
@@ -288,6 +285,8 @@ LPWINE_MMIO MMIO_Get(HMMIO h);
...
@@ -288,6 +285,8 @@ LPWINE_MMIO MMIO_Get(HMMIO h);
BOOL
MULTIMEDIA_PlaySound
(
const
void
*
pszSound
,
HMODULE
hmod
,
DWORD
fdwSound
,
BOOL
bUnicode
);
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_MMTimeStart
(
void
);
void
TIME_MMTimeStop
(
void
);
void
TIME_MMTimeStop
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment