wine-staging/patches/Pipelight/0002-user32-Decrease-minimum-SetTimer-interval-to-5-ms.patch
2015-09-27 20:20:46 +02:00

47 lines
1.8 KiB
Diff

From 08d8e1c398ed6f3e237ad9fd3d29e10d09dcff3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 2 May 2014 20:46:19 +0200
Subject: user32: Decrease minimum SetTimer interval to 5 ms. (try 2)
---
dlls/user32/message.c | 2 +-
dlls/user32/tests/msg.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index d122980..aec0938 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -4443,7 +4443,7 @@ UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc )
if (proc) winproc = WINPROC_AllocProc( (WNDPROC)proc, FALSE );
- timeout = min( max( USER_TIMER_MINIMUM, timeout ), USER_TIMER_MAXIMUM );
+ timeout = min( max( 5, timeout ), USER_TIMER_MAXIMUM );
SERVER_START_REQ( set_win_timer )
{
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index d92fbc7..dbaddb7 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -8521,6 +8521,7 @@ static void test_timers(void)
start = GetTickCount();
while (GetTickCount()-start < 1001 && GetMessageA(&msg, info.hWnd, 0, 0))
DispatchMessageA(&msg);
+todo_wine
ok(abs(count-TIMER_COUNT_EXPECTED) < TIMER_COUNT_TOLERANCE /* xp */
|| broken(abs(count-64) < TIMER_COUNT_TOLERANCE) /* most common */
|| broken(abs(count-43) < TIMER_COUNT_TOLERANCE) /* w2k3, win8 */,
@@ -8589,6 +8590,7 @@ static void test_timers_no_wnd(void)
start = GetTickCount();
while (GetTickCount()-start < 1001 && GetMessageA(&msg, NULL, 0, 0))
DispatchMessageA(&msg);
+todo_wine
ok(abs(count-TIMER_COUNT_EXPECTED) < TIMER_COUNT_TOLERANCE /* xp */
|| broken(abs(count-64) < TIMER_COUNT_TOLERANCE) /* most common */,
"did not get expected count for minimum timeout (%d != ~%d).\n",
--
2.5.1