diff --git a/subsystems/ntvdm/ntvdm.c b/subsystems/ntvdm/ntvdm.c index 5bcbfa9c07b..2b5a8154337 100644 --- a/subsystems/ntvdm/ntvdm.c +++ b/subsystems/ntvdm/ntvdm.c @@ -101,6 +101,8 @@ INT wmain(INT argc, WCHAR *argv[]) } #endif + DPRINT1("\n\n\nNTVDM - Starting '%s'...\n\n\n", CommandLine); + if (!EmulatorInitialize()) { wprintf(L"FATAL: Failed to initialize the CPU emulator\n"); @@ -135,7 +137,7 @@ INT wmain(INT argc, WCHAR *argv[]) if (!DosCreateProcess(CommandLine, 0)) { DisplayMessage(L"Could not start program: %S", CommandLine); - return -1; + goto Cleanup; } /* Find the starting performance and tick count */ @@ -226,6 +228,8 @@ Cleanup: BiosCleanup(); EmulatorCleanup(); + DPRINT1("\n\n\nNTVDM - Exiting...\n\n\n"); + return 0; }