Dmitry Timoshkov : server: Make timer id allocation algorithm conform to the Windows one.
Module: wine Branch: master Commit: b4227d7207424823b787feddc3a7fba095594974 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b4227d7207424823b787feddc3... Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Tue Nov 13 20:41:01 2007 +0800 server: Make timer id allocation algorithm conform to the Windows one. --- server/queue.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/queue.c b/server/queue.c index 51315fd..f6d6ca4 100644 --- a/server/queue.c +++ b/server/queue.c @@ -269,7 +269,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_ queue->paint_count = 0; queue->quit_message = 0; queue->recv_result = NULL; - queue->next_timer_id = 1; + queue->next_timer_id = 0x7fff; queue->timeout = NULL; queue->input = (struct thread_input *)grab_object( input ); queue->hooks = NULL; @@ -1950,7 +1950,7 @@ DECL_HANDLER(set_win_timer) do { id = queue->next_timer_id; - if (++queue->next_timer_id >= 0x10000) queue->next_timer_id = 1; + if (--queue->next_timer_id <= 0x100) queue->next_timer_id = 0x7fff; } while (find_timer( queue, 0, req->msg, id )); }
participants (1)
-
Alexandre Julliard