Author: hbelusca Date: Sun Sep 14 14:59:20 2014 New Revision: 64147
URL: http://svn.reactos.org/svn/reactos?rev=64147&view=rev Log: [NTVDM]: Code formatting and add a warning about the usage of callbacks.
Modified: trunk/reactos/subsystems/ntvdm/callback.c trunk/reactos/subsystems/ntvdm/hardware/mouse.c
Modified: trunk/reactos/subsystems/ntvdm/callback.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/callback.c... ============================================================================== --- trunk/reactos/subsystems/ntvdm/callback.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/ntvdm/callback.c [iso-8859-1] Sun Sep 14 14:59:20 2014 @@ -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
Modified: trunk/reactos/subsystems/ntvdm/hardware/mouse.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/hardware/m... ============================================================================== --- trunk/reactos/subsystems/ntvdm/hardware/mouse.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/ntvdm/hardware/mouse.c [iso-8859-1] Sun Sep 14 14:59:20 2014 @@ -121,7 +121,7 @@ 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 */