X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fgui%2Fapp.cpp;h=7a905a9c76c9940870b0658328eb5126291c089e;hb=19cb30261693d5c56c79d87030cfe8e1dc9ca033;hp=6abfe15cddce199d28d6f4f2ec2ce1000c6e849b;hpb=d9abe1a157bbd35e8b282927489b687f56048ce6;p=virtualjaguar diff --git a/src/gui/app.cpp b/src/gui/app.cpp index 6abfe15..7a905a9 100644 --- a/src/gui/app.cpp +++ b/src/gui/app.cpp @@ -30,6 +30,8 @@ //hm. :-/ // This is stuff we pass into the mainWindow... bool noUntunedTankPlease = false; +bool loadAndGo = false; +QString filename; // Here's the main application loop--short and simple... int main(int argc, char * argv[]) @@ -69,6 +71,13 @@ int main(int argc, char * argv[]) { noUntunedTankPlease = true; } + + // Check for filename + if (argv[1][0] != '-') + { + loadAndGo = true; + filename = argv[1]; + } } Q_INIT_RESOURCE(virtualjaguar); // This must the same name as the exe filename @@ -106,7 +115,7 @@ int main(int argc, char * argv[]) App::App(int argc, char * argv[]): QApplication(argc, argv) { - mainWindow = new MainWin(); + mainWindow = new MainWin(filename); mainWindow->plzDontKillMyComputer = noUntunedTankPlease; mainWindow->show(); }