Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
8deb379f
Commit
8deb379f
authored
Oct 11, 1998
by
Marcus Meissner
Committed by
Alexandre Julliard
Oct 11, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added win32 enhanced functionality to timer callbacks.
parent
b02ffc75
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
18 deletions
+31
-18
mmsystem.h
include/mmsystem.h
+5
-2
multimedia.h
include/multimedia.h
+1
-1
init.c
multimedia/init.c
+4
-4
time.c
multimedia/time.c
+21
-11
No files found.
include/mmsystem.h
View file @
8deb379f
...
@@ -753,8 +753,11 @@ typedef void (CALLBACK *LPTIMECALLBACK16)(UINT16 uTimerID, UINT16 uMessage, DWOR
...
@@ -753,8 +753,11 @@ typedef void (CALLBACK *LPTIMECALLBACK16)(UINT16 uTimerID, UINT16 uMessage, DWOR
typedef
void
(
CALLBACK
*
LPTIMECALLBACK32
)(
UINT32
uTimerID
,
UINT32
uMessage
,
DWORD
dwUser
,
DWORD
dw1
,
DWORD
dw2
);
typedef
void
(
CALLBACK
*
LPTIMECALLBACK32
)(
UINT32
uTimerID
,
UINT32
uMessage
,
DWORD
dwUser
,
DWORD
dw1
,
DWORD
dw2
);
DECL_WINELIB_TYPE
(
LPTIMECALLBACK
)
DECL_WINELIB_TYPE
(
LPTIMECALLBACK
)
#define TIME_ONESHOT 0
/* program timer for single event */
#define TIME_ONESHOT 0x0000
/* program timer for single event */
#define TIME_PERIODIC 1
/* program for continuous periodic event */
#define TIME_PERIODIC 0x0001
/* program for continuous periodic event */
#define TIME_CALLBACK_FUNCTION 0x0000
/* callback is function */
#define TIME_CALLBACK_EVENT_SET 0x0010
/* callback is event - use SetEvent */
#define TIME_CALLBACK_EVENT_PULSE 0x0020
/* callback is event - use PulseEvent */
typedef
struct
{
typedef
struct
{
UINT16
wPeriodMin
;
/* minimum period supported */
UINT16
wPeriodMin
;
/* minimum period supported */
...
...
include/multimedia.h
View file @
8deb379f
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#include "mmsystem.h"
#include "mmsystem.h"
#define MAX_MIDIINDRV (1)
#define MAX_MIDIINDRV (1
6
)
/* For now I'm making 16 the maximum number of midi devices one can
/* For now I'm making 16 the maximum number of midi devices one can
* have. This should be more than enough for everybody. But as a purist,
* have. This should be more than enough for everybody. But as a purist,
* I intend to make it unbounded in the future, as soon as I figure
* I intend to make it unbounded in the future, as soon as I figure
...
...
multimedia/init.c
View file @
8deb379f
...
@@ -92,8 +92,8 @@ BOOL32 MULTIMEDIA_Init(void)
...
@@ -92,8 +92,8 @@ BOOL32 MULTIMEDIA_Init(void)
}
}
if
(
numsynthdevs
>
MAX_MIDIOUTDRV
)
{
if
(
numsynthdevs
>
MAX_MIDIOUTDRV
)
{
ERR
(
midi
,
"MAX_MIDIOUTDRV
was enough for the number of devices
. "
ERR
(
midi
,
"MAX_MIDIOUTDRV
(%d) was enough for the number of devices (%d)
. "
"Some FM devices will not be available.
\n
"
);
"Some FM devices will not be available.
\n
"
,
MAX_MIDIOUTDRV
,
numsynthdevs
);
numsynthdevs
=
MAX_MIDIOUTDRV
;
numsynthdevs
=
MAX_MIDIOUTDRV
;
}
}
...
@@ -167,8 +167,8 @@ BOOL32 MULTIMEDIA_Init(void)
...
@@ -167,8 +167,8 @@ BOOL32 MULTIMEDIA_Init(void)
}
}
if
(
nummididevs
>
MAX_MIDIINDRV
)
{
if
(
nummididevs
>
MAX_MIDIINDRV
)
{
ERR
(
midi
,
"MAX_MIDIINDRV
was not enough for the number of devices
. "
ERR
(
midi
,
"MAX_MIDIINDRV
(%d) was not enough for the number of devices (%d)
. "
"Some MIDI devices will not be available.
\n
"
);
"Some MIDI devices will not be available.
\n
"
,
MAX_MIDIINDRV
,
nummididevs
);
nummididevs
=
MAX_MIDIINDRV
;
nummididevs
=
MAX_MIDIINDRV
;
}
}
...
...
multimedia/time.c
View file @
8deb379f
...
@@ -72,13 +72,25 @@ static void TIME_TriggerCallBack(LPTIMERENTRY lpTimer, DWORD dwCurrent)
...
@@ -72,13 +72,25 @@ static void TIME_TriggerCallBack(LPTIMERENTRY lpTimer, DWORD dwCurrent)
* PostMessage), and must reside in DLL (therefore uses stack of active application). So I
* PostMessage), and must reside in DLL (therefore uses stack of active application). So I
* guess current implementation via SetTimer has to be improved upon.
* guess current implementation via SetTimer has to be improved upon.
*/
*/
if
(
lpTimer
->
isWin32
)
switch
(
lpTimer
->
wFlags
&
0x30
)
{
lpTimer
->
lpFunc
(
lpTimer
->
wTimerID
,
0
,
lpTimer
->
dwUser
,
0
,
0
);
case
TIME_CALLBACK_FUNCTION
:
else
if
(
lpTimer
->
isWin32
)
Callbacks
->
CallTimeFuncProc
(
lpTimer
->
lpFunc
,
lpTimer
->
lpFunc
(
lpTimer
->
wTimerID
,
0
,
lpTimer
->
dwUser
,
0
,
0
);
lpTimer
->
wTimerID
,
0
,
else
lpTimer
->
dwUser
,
0
,
0
);
Callbacks
->
CallTimeFuncProc
(
lpTimer
->
lpFunc
,
lpTimer
->
wTimerID
,
0
,
lpTimer
->
dwUser
,
0
,
0
);
break
;
case
TIME_CALLBACK_EVENT_SET
:
SetEvent
((
HANDLE32
)
lpTimer
->
lpFunc
);
break
;
case
TIME_CALLBACK_EVENT_PULSE
:
PulseEvent
((
HANDLE32
)
lpTimer
->
lpFunc
);
break
;
default:
FIXME
(
mmtime
,
"Unknown callback type 0x%04x for mmtime callback (%p),ignored.
\n
"
,
lpTimer
->
wFlags
,
lpTimer
->
lpFunc
);
break
;
}
TRACE
(
mmtime
,
"after CallBack16 !
\n
"
);
TRACE
(
mmtime
,
"after CallBack16 !
\n
"
);
fflush
(
stdout
);
fflush
(
stdout
);
}
}
...
@@ -327,13 +339,13 @@ MMRESULT16 WINAPI timeEndPeriod16(UINT16 wPeriod)
...
@@ -327,13 +339,13 @@ MMRESULT16 WINAPI timeEndPeriod16(UINT16 wPeriod)
DWORD
WINAPI
timeGetTime
()
DWORD
WINAPI
timeGetTime
()
{
{
DWORD
dwNewTick
=
GetTickCount
();
DWORD
dwNewTick
=
GetTickCount
();
StartMMTime
();
#ifdef USE_FAKE_MM_TIMERS
#ifdef USE_FAKE_MM_TIMERS
if
(
bUseFakeTimers
)
{
if
(
bUseFakeTimers
)
{
if
(
wInCallBackLoop
++
)
{
if
(
wInCallBackLoop
++
)
{
DWORD
dwDelta
;
DWORD
dwDelta
;
StartMMTime
();
if
(
dwNewTick
<
dwLastCBTick
)
{
if
(
dwNewTick
<
dwLastCBTick
)
{
ERR
(
mmtime
,
"dwNewTick(%lu) < dwLastCBTick(%lu)
\n
"
,
dwNewTick
,
dwLastCBTick
);
ERR
(
mmtime
,
"dwNewTick(%lu) < dwLastCBTick(%lu)
\n
"
,
dwNewTick
,
dwLastCBTick
);
...
@@ -357,7 +369,5 @@ DWORD WINAPI timeGetTime()
...
@@ -357,7 +369,5 @@ DWORD WINAPI timeGetTime()
wInCallBackLoop
--
;
wInCallBackLoop
--
;
}
}
#endif
#endif
TRACE
(
mmtime
,
"Time = %ld
\n
"
,
dwNewTick
);
return
dwNewTick
;
return
dwNewTick
;
}
}
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