X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fapp.cpp;h=8cf3f1ea36159d02ac15ea9cf61dfd763b0249f5;hb=56f80e7876367f9da3cff765b46e842270d45a0d;hp=bbe1333a04cb15af8fdd4624f2f5ce25e30fb8fd;hpb=69effddb777c2009d32f70e3315d5570973446ef;p=virtualjaguar diff --git a/src/gui/app.cpp b/src/gui/app.cpp index bbe1333..8cf3f1e 100644 --- a/src/gui/app.cpp +++ b/src/gui/app.cpp @@ -61,11 +61,11 @@ int main(int argc, char * argv[]) if (AttachConsole != NULL && AttachConsole(((DWORD)-1))) { if (_fileno(stdout) == -1) - freopen("CONOUT$","wb",stdout); + freopen("CONOUT$", "wb", stdout); if (_fileno(stderr) == -1) - freopen("CONOUT$","wb",stderr); + freopen("CONOUT$", "wb", stderr); if (_fileno(stdin) == -1) - freopen("CONIN$","rb",stdin); + freopen("CONIN$", "rb", stdin); // Fix C++ std::ios::sync_with_stdio(); @@ -123,7 +123,8 @@ int main(int argc, char * argv[]) fclose(ctt); #endif #endif - LogDone(); // Close logfile + // Close logfile + LogDone(); return retVal; } @@ -136,12 +137,18 @@ App::App(int & argc, char * argv[]): QApplication(argc, argv) mainWindow = new MainWin(loadAndGo); mainWindow->plzDontKillMyComputer = noUntunedTankPlease; - ParseOptions(argc, argv); // Override defaults with command line (if any) + // Override defaults with command line (if any) + ParseOptions(argc, argv); mainWindow->SyncUI(); if (loadAndGo) + { mainWindow->LoadFile(filename); + if (!mainWindow->cartridgeLoaded) + printf("Could not load file \"%s\"!\n", filename.toAscii().data()); + } + mainWindow->show(); } @@ -189,7 +196,7 @@ bool ParseCommandLine(int argc, char * argv[]) " -z Run Virtual Jaguar without \"snow\"\n" "\n" "Invoking Virtual Jagaur with no filename will cause it to boot up\n" - "with the VJ GUI.\n" + "with the VJ GUI. Using Alpine mode will enable log file.\n" "\n"); return false; } @@ -206,6 +213,8 @@ bool ParseCommandLine(int argc, char * argv[]) { printf("Alpine Mode enabled.\n"); vjs.hardwareTypeAlpine = true; + // We also enable logging as well :-) + useLogfile = true; } if ((strcmp(argv[i], "--please-dont-kill-my-computer") == 0) || (strcmp(argv[i], "-z") == 0)) @@ -335,3 +344,4 @@ void ParseOptions(int argc, char * argv[]) char alpineROMPath[MAX_PATH]; char absROMPath[MAX_PATH]; #endif +