From 5dafb169e0461dc66db81af4b7d7316c4cb27a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 28 Jan 2014 20:18:52 +0000 Subject: [PATCH] [NTVDM]: Replace my #if 0 by #ifdef IPS_DISPLAY for DPRINTing (or not) the no. of instructions per seconds. svn path=/branches/ntvdm/; revision=61865 --- subsystems/ntvdm/ntvdm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/subsystems/ntvdm/ntvdm.c b/subsystems/ntvdm/ntvdm.c index bd730ac81b9..9d5e6cfb565 100644 --- a/subsystems/ntvdm/ntvdm.c +++ b/subsystems/ntvdm/ntvdm.c @@ -26,6 +26,8 @@ */ #define TESTING +#define IPS_DISPLAY + /* PUBLIC VARIABLES ***********************************************************/ static HANDLE ConsoleInput = INVALID_HANDLE_VALUE; @@ -169,7 +171,7 @@ INT wmain(INT argc, WCHAR *argv[]) DWORD StartTickCount, CurrentTickCount; DWORD LastClockUpdate; DWORD LastVerticalRefresh; -#if 0 +#ifdef IPS_DISPLAY DWORD LastCyclePrintout; DWORD Cycles = 0; #endif @@ -243,7 +245,11 @@ INT wmain(INT argc, WCHAR *argv[]) QueryPerformanceCounter(&StartPerfCount); /* Set the different last counts to the starting count */ - LastClockUpdate = LastVerticalRefresh = /*LastCyclePrintout =*/ StartTickCount; + LastClockUpdate = LastVerticalRefresh = +#ifdef IPS_DISPLAY + LastCyclePrintout = +#endif + StartTickCount; /* Set the last timer ticks to the current time */ LastTimerTick = LastRtcTick = StartPerfCount; @@ -317,12 +323,12 @@ INT wmain(INT argc, WCHAR *argv[]) for (i = 0; (i < STEPS_PER_CYCLE) && VdmRunning; i++) { EmulatorStep(); -#if 0 +#ifdef IPS_DISPLAY Cycles++; #endif } -#if 0 +#ifdef IPS_DISPLAY if ((CurrentTickCount - LastCyclePrintout) >= 1000) { DPRINT1("NTVDM: %lu Instructions Per Second\n", Cycles);