From 2f4bbc83550726bb6e84f20a17771b79ada4ea61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 14 Sep 2014 14:59:20 +0000 Subject: [PATCH] [NTVDM]: Code formatting and add a warning about the usage of callbacks. svn path=/trunk/; revision=64147 --- reactos/subsystems/ntvdm/callback.c | 8 ++++++++ reactos/subsystems/ntvdm/hardware/mouse.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/reactos/subsystems/ntvdm/callback.c b/reactos/subsystems/ntvdm/callback.c index d1ecaf3f436..6c7e552935f 100644 --- a/reactos/subsystems/ntvdm/callback.c +++ b/reactos/subsystems/ntvdm/callback.c @@ -7,6 +7,14 @@ * Hermes Belusca-Maito (hermes.belusca@sfr.fr) */ +/******************************************************************************\ +| WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! +| +| Callbacks support supposes implicitely that the callbacks are used +| in the SAME thread as the CPU thread, otherwise messing in parallel +| with the CPU registers is 100% prone to bugs!! +\******************************************************************************/ + /* INCLUDES *******************************************************************/ #define NDEBUG diff --git a/reactos/subsystems/ntvdm/hardware/mouse.c b/reactos/subsystems/ntvdm/hardware/mouse.c index 63399d90cce..65727d1e3e7 100644 --- a/reactos/subsystems/ntvdm/hardware/mouse.c +++ b/reactos/subsystems/ntvdm/hardware/mouse.c @@ -121,7 +121,7 @@ static VOID MouseGetPacket(PMOUSE_PACKET Packet) VOID MouseUpdatePosition(PCOORD NewPosition) { /* Update the counters */ - HorzCounter += ((NewPosition->X - Position.X) * WidthMm * Resolution) / WidthPixels; + HorzCounter += ((NewPosition->X - Position.X) * WidthMm * Resolution) / WidthPixels; VertCounter += ((NewPosition->Y - Position.Y) * HeightMm * Resolution) / HeightPixels; /* Update the position */