Fix the TESTING case, in case you run ntvdm without other parameters.

svn path=/branches/ntvdm/; revision=59498
This commit is contained in:
Hermès Bélusca-Maïto 2013-07-18 00:17:04 +00:00
parent bebaf9e812
commit c5dad7aefe

View file

@ -16,6 +16,12 @@
#include "pic.h"
#include "ps2.h"
/*
* Activate this line if you want to be able to test NTVDM with:
* ntvdm.exe <program>
*/
// #define TESTING
/* PUBLIC VARIABLES ***********************************************************/
BOOLEAN VdmRunning = TRUE;
@ -84,7 +90,16 @@ INT wmain(INT argc, WCHAR *argv[])
/* The DOS command line must be ASCII */
WideCharToMultiByte(CP_ACP, 0, GetCommandLine(), -1, CommandLine, 128, NULL, NULL);
#else
WideCharToMultiByte(CP_ACP, 0, argv[1], -1, CommandLine, 128, NULL, NULL);
if (argc == 2 && argv[1] != NULL)
{
WideCharToMultiByte(CP_ACP, 0, argv[1], -1, CommandLine, 128, NULL, NULL);
}
else
{
wprintf(L"\nReactOS Virtual DOS Machine\n\n"
L"Usage: NTVDM <executable>\n");
return 0;
}
#endif
if (!EmulatorInitialize())