From 259f3d86e354caca17581d804a75cd75211d43f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 8 Apr 2014 14:57:24 +0000 Subject: [PATCH] [NTVDM] Fix few DPRINTs. The DOS program starting code (common for STANDALONE and OS-integrated modes) can be moved into a helper function later on. svn path=/branches/ntvdm/; revision=62688 --- subsystems/ntvdm/ntvdm.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/subsystems/ntvdm/ntvdm.c b/subsystems/ntvdm/ntvdm.c index a533fe520d2..efdcbd118b7 100644 --- a/subsystems/ntvdm/ntvdm.c +++ b/subsystems/ntvdm/ntvdm.c @@ -394,10 +394,10 @@ INT wmain(INT argc, WCHAR *argv[]) return 0; } - DPRINT1("\n\n\nNTVDM - Starting '%s'...\n\n\n", CommandLine); - #endif + DPRINT1("\n\n\nNTVDM - Starting...\n\n\n"); + /* Initialize the console */ if (!ConsoleInit()) { @@ -446,12 +446,14 @@ INT wmain(INT argc, WCHAR *argv[]) CommandInfo.Title = Title; CommandInfo.TitleLen = sizeof(Title); + /* Wait for the next available VDM */ if (!GetNextVDMCommand(&CommandInfo)) break; /* Start the process from the command line */ + DPRINT1("Starting '%s'...\n", AppName); if (!DosCreateProcess(AppName, 0)) { - DisplayMessage(L"Could not start program: %S", AppName); + DisplayMessage(L"Could not start '%S'", AppName); goto Cleanup; } @@ -465,28 +467,32 @@ INT wmain(INT argc, WCHAR *argv[]) #else /* Start the process from the command line */ + DPRINT1("Starting '%s'...\n", CommandLine); if (!DosCreateProcess(CommandLine, 0)) { - DisplayMessage(L"Could not start program: %S", CommandLine); + DisplayMessage(L"Could not start '%S'", CommandLine); goto Cleanup; } /* Start simulation */ EmulatorSimulate(); -#endif - /* Perform another screen refresh */ VgaRefreshDisplay(); +#endif + Cleanup: BiosCleanup(); EmulatorCleanup(); ConsoleCleanup(); +#ifndef STANDALONE + ExitVDM(FALSE, 0); +#endif + /* Quit the VDM */ DPRINT1("\n\n\nNTVDM - Exiting...\n\n\n"); - ExitVDM(FALSE, 0); return 0; }