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
88ff58ee
Commit
88ff58ee
authored
Dec 17, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store the 16-bit callback in the timer structure instead of using a
thunk.
parent
9fcd89a5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
system.c
misc/system.c
+7
-10
No files found.
misc/system.c
View file @
88ff58ee
...
...
@@ -9,9 +9,7 @@
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "services.h"
#include "callback.h"
#include "stackframe.h"
#include "builtin16.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
system
);
...
...
@@ -19,6 +17,7 @@ DEFAULT_DEBUG_CHANNEL(system);
typedef
struct
{
SYSTEMTIMERPROC
callback
;
/* NULL if not in use */
FARPROC16
callback16
;
INT
rate
;
INT
ticks
;
}
SYSTEM_TIMER
;
...
...
@@ -126,9 +125,11 @@ WORD WINAPI CreateSystemTimer( WORD rate, SYSTEMTIMERPROC callback )
/**********************************************************************/
static
void
SYSTEM_CallSystemTimerProc
(
FARPROC16
proc
,
WORD
timer
)
static
void
call_timer_proc16
(
WORD
timer
)
{
CONTEXT86
context
;
FARPROC16
proc
=
SYS_Timers
[
timer
-
1
].
callback16
;
memset
(
&
context
,
'\0'
,
sizeof
(
context
)
);
context
.
SegCs
=
SELECTOROF
(
proc
);
...
...
@@ -145,10 +146,9 @@ static void SYSTEM_CallSystemTimerProc( FARPROC16 proc, WORD timer )
WORD
WINAPI
WIN16_CreateSystemTimer
(
WORD
rate
,
FARPROC16
proc
)
{
FARPROC
thunk
=
THUNK_Alloc
(
proc
,
(
RELAY
)
SYSTEM_CallSystemTimerProc
);
WORD
timer
=
CreateSystemTimer
(
rate
,
(
SYSTEMTIMERPROC
)
thunk
);
if
(
!
timer
)
THUNK_Free
(
thunk
);
return
timer
;
WORD
ret
=
CreateSystemTimer
(
rate
,
call_timer_proc16
);
if
(
ret
)
SYS_Timers
[
ret
-
1
].
callback16
=
proc
;
return
ret
;
}
...
...
@@ -161,10 +161,7 @@ WORD WINAPI SYSTEM_KillSystemTimer( WORD timer )
{
if
(
!
timer
||
timer
>
NB_SYS_TIMERS
||
!
SYS_Timers
[
timer
-
1
].
callback
)
return
timer
;
/* Error */
THUNK_Free
(
(
FARPROC
)
SYS_Timers
[
timer
-
1
].
callback
);
SYS_Timers
[
timer
-
1
].
callback
=
NULL
;
if
(
!--
SYS_NbTimers
)
SYSTEM_StopTicks
();
return
0
;
}
...
...
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