user.exe: Implement SetSystemTimer() using SetTimer().
Avoid using SetSystemTimer() to specify a callback; it does not support one. Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7435487992
commit
33087806a6
|
@ -1292,6 +1292,11 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT
|
|||
lParam = MAKELPARAM( 0, convert_handle_32_to_16( lParam, GMEM_DDESHARE ));
|
||||
ret = callback( HWND_16(hwnd), msg, wParam, lParam, result, arg );
|
||||
break; /* FIXME don't know how to free allocated memory (handle) !! */
|
||||
case WM_TIMER:
|
||||
if (wParam & SYSTEM_TIMER_FLAG)
|
||||
msg = WM_SYSTIMER;
|
||||
ret = callback( HWND_16(hwnd), msg, wParam, lParam, result, arg );
|
||||
break;
|
||||
case SBM_SETRANGE:
|
||||
ret = callback( HWND_16(hwnd), SBM_SETRANGE16, 0, MAKELPARAM(wParam, lParam), result, arg );
|
||||
break;
|
||||
|
|
|
@ -95,6 +95,8 @@ extern void call_WH_CALLWNDPROC_hook( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPAR
|
|||
|
||||
#define WM_SYSTIMER 0x0118
|
||||
|
||||
#define SYSTEM_TIMER_FLAG 0x10000
|
||||
|
||||
/* Dialog info structure (must match the user32 one) */
|
||||
typedef struct tagDIALOGINFO
|
||||
{
|
||||
|
|
|
@ -111,7 +111,7 @@ UINT16 WINAPI SetTimer16( HWND16 hwnd, UINT16 id, UINT16 timeout, TIMERPROC16 pr
|
|||
UINT16 WINAPI SetSystemTimer16( HWND16 hwnd, UINT16 id, UINT16 timeout, TIMERPROC16 proc )
|
||||
{
|
||||
TIMERPROC proc32 = (TIMERPROC)WINPROC_AllocProc16( (WNDPROC16)proc );
|
||||
return SetSystemTimer( WIN_Handle32(hwnd), id, timeout, proc32 );
|
||||
return SetTimer( WIN_Handle32(hwnd), (UINT_PTR)id | SYSTEM_TIMER_FLAG, timeout, proc32 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1087,7 +1087,7 @@ void WINAPI SwitchToThisWindow16( HWND16 hwnd, BOOL16 restore )
|
|||
*/
|
||||
BOOL16 WINAPI KillSystemTimer16( HWND16 hwnd, UINT16 id )
|
||||
{
|
||||
return KillSystemTimer( WIN_Handle32(hwnd), id );
|
||||
return KillTimer( WIN_Handle32(hwnd), (UINT_PTR)id | SYSTEM_TIMER_FLAG );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue