Vitaliy Margolen : dinput: Simplify code a bit.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 24 06:55:01 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 3241974ebd723dc0bfc9d1410f052afd617e7ba3
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=3241974ebd723dc0bfc9d1410f052afd617e7ba3

Author: Vitaliy Margolen <wine-patch at kievinfo.com>
Date:   Sat Jul 22 13:11:33 2006 -0600

dinput: Simplify code a bit.

---

 dlls/dinput/device_private.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h
index 9cde397..8ccd0ab 100644
--- a/dlls/dinput/device_private.h
+++ b/dlls/dinput/device_private.h
@@ -64,8 +64,7 @@ #define GEN_EVENT(offset,data,xtime,seq)
 	  (int) (data), (int) (offset),                           		\
 	  (int) (This->queue_head), (int) (This->queue_len));			\
 										\
-    nq = This->queue_head+1;							\
-    while (nq >= This->queue_len) nq -= This->queue_len;			\
+    nq = (This->queue_head+1) % This->queue_len;				\
     if ((offset >= 0) && (nq != This->queue_tail)) {				\
       This->data_queue[This->queue_head].dwOfs = offset;			\
       This->data_queue[This->queue_head].dwData = data;				\




More information about the wine-cvs mailing list