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
This commit is contained in:
Hermès Bélusca-Maïto 2014-04-08 14:57:24 +00:00
parent 67c46a3b02
commit 259f3d86e3

View file

@ -394,10 +394,10 @@ INT wmain(INT argc, WCHAR *argv[])
return 0; return 0;
} }
DPRINT1("\n\n\nNTVDM - Starting '%s'...\n\n\n", CommandLine);
#endif #endif
DPRINT1("\n\n\nNTVDM - Starting...\n\n\n");
/* Initialize the console */ /* Initialize the console */
if (!ConsoleInit()) if (!ConsoleInit())
{ {
@ -446,12 +446,14 @@ INT wmain(INT argc, WCHAR *argv[])
CommandInfo.Title = Title; CommandInfo.Title = Title;
CommandInfo.TitleLen = sizeof(Title); CommandInfo.TitleLen = sizeof(Title);
/* Wait for the next available VDM */
if (!GetNextVDMCommand(&CommandInfo)) break; if (!GetNextVDMCommand(&CommandInfo)) break;
/* Start the process from the command line */ /* Start the process from the command line */
DPRINT1("Starting '%s'...\n", AppName);
if (!DosCreateProcess(AppName, 0)) if (!DosCreateProcess(AppName, 0))
{ {
DisplayMessage(L"Could not start program: %S", AppName); DisplayMessage(L"Could not start '%S'", AppName);
goto Cleanup; goto Cleanup;
} }
@ -465,28 +467,32 @@ INT wmain(INT argc, WCHAR *argv[])
#else #else
/* Start the process from the command line */ /* Start the process from the command line */
DPRINT1("Starting '%s'...\n", CommandLine);
if (!DosCreateProcess(CommandLine, 0)) if (!DosCreateProcess(CommandLine, 0))
{ {
DisplayMessage(L"Could not start program: %S", CommandLine); DisplayMessage(L"Could not start '%S'", CommandLine);
goto Cleanup; goto Cleanup;
} }
/* Start simulation */ /* Start simulation */
EmulatorSimulate(); EmulatorSimulate();
#endif
/* Perform another screen refresh */ /* Perform another screen refresh */
VgaRefreshDisplay(); VgaRefreshDisplay();
#endif
Cleanup: Cleanup:
BiosCleanup(); BiosCleanup();
EmulatorCleanup(); EmulatorCleanup();
ConsoleCleanup(); ConsoleCleanup();
#ifndef STANDALONE
ExitVDM(FALSE, 0);
#endif
/* Quit the VDM */ /* Quit the VDM */
DPRINT1("\n\n\nNTVDM - Exiting...\n\n\n"); DPRINT1("\n\n\nNTVDM - Exiting...\n\n\n");
ExitVDM(FALSE, 0);
return 0; return 0;
} }