From: Hermès Bélusca-Maïto Date: Tue, 8 Apr 2014 14:57:24 +0000 (+0000) Subject: [NTVDM] X-Git-Tag: backups/0.3.17@66124~1365^2~27 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=259f3d86e354caca17581d804a75cd75211d43f6 [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 --- 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; }