Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
8deb379f
Commit
8deb379f
authored
26 years ago
by
Marcus Meissner
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added win32 enhanced functionality to timer callbacks.
parent
b02ffc75
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/mmsystem.h
+5
-2
5 additions, 2 deletions
include/mmsystem.h
include/multimedia.h
+1
-1
1 addition, 1 deletion
include/multimedia.h
multimedia/init.c
+4
-4
4 additions, 4 deletions
multimedia/init.c
multimedia/time.c
+21
-11
21 additions, 11 deletions
multimedia/time.c
with
31 additions
and
18 deletions
include/mmsystem.h
+
5
−
2
View file @
8deb379f
...
...
@@ -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
);
DECL_WINELIB_TYPE
(
LPTIMECALLBACK
)
#define TIME_ONESHOT 0
/* program timer for single event */
#define TIME_PERIODIC 1
/* program for continuous periodic event */
#define TIME_ONESHOT 0x0000
/* program timer for single 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
{
UINT16
wPeriodMin
;
/* minimum period supported */
...
...
This diff is collapsed.
Click to expand it.
include/multimedia.h
+
1
−
1
View file @
8deb379f
...
...
@@ -11,7 +11,7 @@
#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
* 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
...
...
This diff is collapsed.
Click to expand it.
multimedia/init.c
+
4
−
4
View file @
8deb379f
...
...
@@ -92,8 +92,8 @@ BOOL32 MULTIMEDIA_Init(void)
}
if
(
numsynthdevs
>
MAX_MIDIOUTDRV
)
{
ERR
(
midi
,
"MAX_MIDIOUTDRV was enough for the number of devices. "
"Some FM devices will not be available.
\n
"
);
ERR
(
midi
,
"MAX_MIDIOUTDRV
(%d)
was enough for the number of devices
(%d)
. "
"Some FM devices will not be available.
\n
"
,
MAX_MIDIOUTDRV
,
numsynthdevs
);
numsynthdevs
=
MAX_MIDIOUTDRV
;
}
...
...
@@ -167,8 +167,8 @@ BOOL32 MULTIMEDIA_Init(void)
}
if
(
nummididevs
>
MAX_MIDIINDRV
)
{
ERR
(
midi
,
"MAX_MIDIINDRV was not enough for the number of devices. "
"Some MIDI devices will not be available.
\n
"
);
ERR
(
midi
,
"MAX_MIDIINDRV
(%d)
was not enough for the number of devices
(%d)
. "
"Some MIDI devices will not be available.
\n
"
,
MAX_MIDIINDRV
,
nummididevs
);
nummididevs
=
MAX_MIDIINDRV
;
}
...
...
This diff is collapsed.
Click to expand it.
multimedia/time.c
+
21
−
11
View file @
8deb379f
...
...
@@ -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
* guess current implementation via SetTimer has to be improved upon.
*/
if
(
lpTimer
->
isWin32
)
lpTimer
->
lpFunc
(
lpTimer
->
wTimerID
,
0
,
lpTimer
->
dwUser
,
0
,
0
);
else
Callbacks
->
CallTimeFuncProc
(
lpTimer
->
lpFunc
,
lpTimer
->
wTimerID
,
0
,
lpTimer
->
dwUser
,
0
,
0
);
switch
(
lpTimer
->
wFlags
&
0x30
)
{
case
TIME_CALLBACK_FUNCTION
:
if
(
lpTimer
->
isWin32
)
lpTimer
->
lpFunc
(
lpTimer
->
wTimerID
,
0
,
lpTimer
->
dwUser
,
0
,
0
);
else
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
"
);
fflush
(
stdout
);
}
...
...
@@ -327,13 +339,13 @@ MMRESULT16 WINAPI timeEndPeriod16(UINT16 wPeriod)
DWORD
WINAPI
timeGetTime
()
{
DWORD
dwNewTick
=
GetTickCount
();
StartMMTime
();
#ifdef USE_FAKE_MM_TIMERS
if
(
bUseFakeTimers
)
{
if
(
wInCallBackLoop
++
)
{
DWORD
dwDelta
;
StartMMTime
();
if
(
dwNewTick
<
dwLastCBTick
)
{
ERR
(
mmtime
,
"dwNewTick(%lu) < dwLastCBTick(%lu)
\n
"
,
dwNewTick
,
dwLastCBTick
);
...
...
@@ -357,7 +369,5 @@ DWORD WINAPI timeGetTime()
wInCallBackLoop
--
;
}
#endif
TRACE
(
mmtime
,
"Time = %ld
\n
"
,
dwNewTick
);
return
dwNewTick
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment