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
4f8b800f
Commit
4f8b800f
authored
Oct 08, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system.drv16: Remove the 32-bit timer callback support.
Also merge CreateSystemTimer() with WIN16_CreateSystemTimer() and rename it to CreateSystemTimer16() for consistency.
parent
4c357492
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
42 deletions
+21
-42
system.c
dlls/system.drv16/system.c
+20
-36
system.drv16.spec
dlls/system.drv16/system.drv16.spec
+1
-1
winuser16.h
include/wine/winuser16.h
+0
-5
No files found.
dlls/system.drv16/system.c
View file @
4f8b800f
...
...
@@ -34,7 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(system);
typedef
struct
{
SYSTEMTIMERPROC
callback
;
/* NULL if not in use */
FARPROC16
callback16
;
INT
rate
;
INT
ticks
;
...
...
@@ -49,6 +48,7 @@ static HANDLE SYS_timer;
static
HANDLE
SYS_thread
;
static
int
SYS_timers_disabled
;
/***********************************************************************
* SYSTEM_TimerTick
*/
...
...
@@ -59,11 +59,23 @@ static void CALLBACK SYSTEM_TimerTick( LPVOID arg, DWORD low, DWORD high )
if
(
SYS_timers_disabled
)
return
;
for
(
i
=
0
;
i
<
NB_SYS_TIMERS
;
i
++
)
{
if
(
!
SYS_Timers
[
i
].
callback
)
continue
;
if
(
!
SYS_Timers
[
i
].
callback
16
)
continue
;
if
((
SYS_Timers
[
i
].
ticks
-=
SYS_TIMER_RATE
)
<=
0
)
{
FARPROC16
proc
=
SYS_Timers
[
i
].
callback16
;
CONTEXT86
context
;
SYS_Timers
[
i
].
ticks
+=
SYS_Timers
[
i
].
rate
;
SYS_Timers
[
i
].
callback
(
i
+
1
);
memset
(
&
context
,
0
,
sizeof
(
context
)
);
context
.
SegFs
=
wine_get_fs
();
context
.
SegGs
=
wine_get_gs
();
context
.
SegCs
=
SELECTOROF
(
proc
);
context
.
Eip
=
OFFSETOF
(
proc
);
context
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
FIELD_OFFSET
(
STACK16FRAME
,
bp
);
context
.
Eax
=
i
+
1
;
WOWCallback16Ex
(
0
,
WCB16_REGS
,
0
,
NULL
,
(
DWORD
*
)
&
context
);
}
}
}
...
...
@@ -150,51 +162,23 @@ DWORD WINAPI InquireSystem16( WORD code, WORD arg )
/***********************************************************************
* CreateSystemTimer (SYSTEM.2)
*/
WORD
WINAPI
CreateSystemTimer
(
WORD
rate
,
SYSTEMTIMERPROC
callback
)
WORD
WINAPI
CreateSystemTimer
16
(
WORD
rate
,
FARPROC16
proc
)
{
int
i
;
for
(
i
=
0
;
i
<
NB_SYS_TIMERS
;
i
++
)
if
(
!
SYS_Timers
[
i
].
callback
)
/* Found one */
if
(
!
SYS_Timers
[
i
].
callback
16
)
/* Found one */
{
SYS_Timers
[
i
].
rate
=
(
UINT
)
rate
*
1000
;
if
(
SYS_Timers
[
i
].
rate
<
SYS_TIMER_RATE
)
SYS_Timers
[
i
].
rate
=
SYS_TIMER_RATE
;
SYS_Timers
[
i
].
ticks
=
SYS_Timers
[
i
].
rate
;
SYS_Timers
[
i
].
callback
=
callback
;
SYS_Timers
[
i
].
callback
16
=
proc
;
if
(
++
SYS_NbTimers
==
1
)
SYSTEM_StartTicks
();
return
i
+
1
;
/* 0 means error */
}
return
0
;
}
/**********************************************************************/
static
void
call_timer_proc16
(
WORD
timer
)
{
CONTEXT86
context
;
FARPROC16
proc
=
SYS_Timers
[
timer
-
1
].
callback16
;
memset
(
&
context
,
0
,
sizeof
(
context
)
);
context
.
SegFs
=
wine_get_fs
();
context
.
SegGs
=
wine_get_gs
();
context
.
SegCs
=
SELECTOROF
(
proc
);
context
.
Eip
=
OFFSETOF
(
proc
);
context
.
Ebp
=
OFFSETOF
(
NtCurrentTeb
()
->
WOW32Reserved
)
+
FIELD_OFFSET
(
STACK16FRAME
,
bp
);
context
.
Eax
=
timer
;
WOWCallback16Ex
(
0
,
WCB16_REGS
,
0
,
NULL
,
(
DWORD
*
)
&
context
);
}
/**********************************************************************/
WORD
WINAPI
WIN16_CreateSystemTimer
(
WORD
rate
,
FARPROC16
proc
)
{
WORD
ret
=
CreateSystemTimer
(
rate
,
call_timer_proc16
);
if
(
ret
)
SYS_Timers
[
ret
-
1
].
callback16
=
proc
;
return
ret
;
}
/***********************************************************************
* KillSystemTimer (SYSTEM.3)
...
...
@@ -203,9 +187,9 @@ WORD WINAPI WIN16_CreateSystemTimer( WORD rate, FARPROC16 proc )
*/
WORD
WINAPI
SYSTEM_KillSystemTimer
(
WORD
timer
)
{
if
(
!
timer
||
timer
>
NB_SYS_TIMERS
||
!
SYS_Timers
[
timer
-
1
].
callback
)
if
(
!
timer
||
timer
>
NB_SYS_TIMERS
||
!
SYS_Timers
[
timer
-
1
].
callback
16
)
return
timer
;
/* Error */
SYS_Timers
[
timer
-
1
].
callback
=
NULL
;
SYS_Timers
[
timer
-
1
].
callback
16
=
0
;
if
(
!--
SYS_NbTimers
)
SYSTEM_StopTicks
();
return
0
;
}
...
...
dlls/system.drv16/system.drv16.spec
View file @
4f8b800f
1 pascal InquireSystem(word word) InquireSystem16
2 pascal -ret16 CreateSystemTimer(word segptr)
WIN16_CreateSystemTimer
2 pascal -ret16 CreateSystemTimer(word segptr)
CreateSystemTimer16
3 pascal -ret16 KillSystemTimer(word) SYSTEM_KillSystemTimer
4 pascal -ret16 EnableSystemTimers() EnableSystemTimers16
5 pascal -ret16 DisableSystemTimers() DisableSystemTimers16
...
...
include/wine/winuser16.h
View file @
4f8b800f
...
...
@@ -961,12 +961,7 @@ INT16 WINAPI lstrcmpi16(LPCSTR,LPCSTR);
/* undocumented functions */
typedef
VOID
(
*
SYSTEMTIMERPROC
)(
WORD
);
void
WINAPI
ConvertDialog32To16
(
LPCVOID
,
DWORD
,
LPVOID
);
WORD
WINAPI
CreateSystemTimer
(
WORD
,
SYSTEMTIMERPROC
);
VOID
WINAPI
DisableSystemTimers16
(
void
);
VOID
WINAPI
EnableSystemTimers16
(
void
);
BOOL16
WINAPI
EnumTaskWindows16
(
HTASK16
,
WNDENUMPROC16
,
LPARAM
);
BOOL16
WINAPI
GrayString16
(
HDC16
,
HBRUSH16
,
GRAYSTRINGPROC16
,
LPARAM
,
INT16
,
INT16
,
INT16
,
INT16
,
INT16
);
...
...
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