wine-staging/patches/Pipelight/0002-user32-Decrease-minimum-SetTimer-interval-to-5-ms.patch

47 lines
1.9 KiB
Diff
Raw Normal View History

From 40630c14377561e90a4be405d2124338002a88f7 Mon Sep 17 00:00:00 2001
2014-05-02 11:50:58 -07:00
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 2 May 2014 20:46:19 +0200
Subject: [PATCH] user32: Decrease minimum SetTimer interval to 5 ms. (try 2)
2014-05-02 11:50:58 -07:00
---
dlls/user32/message.c | 2 +-
dlls/user32/tests/msg.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
2014-05-02 11:50:58 -07:00
diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index 1336865112a..cbe9920384f 100644
2014-05-02 11:50:58 -07:00
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -4496,7 +4496,7 @@ UINT_PTR WINAPI SetCoalescableTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMER
2014-05-02 11:50:58 -07:00
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 c0ba5834cf9..a6bc158e8a7 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -10282,6 +10282,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 */,
@@ -10352,6 +10353,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 */
|| broken(abs(count-43) <= TIMER_COUNT_TOLERANCE) /* w1064v1809 */,
2014-05-02 11:50:58 -07:00
--
2.17.1
2014-05-02 11:50:58 -07:00