X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fapp.cpp;h=f3481e9ab4e74736de0d01d9a2b91017addc7afb;hb=b74298f2a4540168f8e4a2bbc9fc6fdc7f4afa57;hp=82a4010160e8503f2969ff4c732ddccff2aa02cd;hpb=a837ec444729b2f195506e66a36fe4954741725f;p=virtualjaguar diff --git a/src/gui/app.cpp b/src/gui/app.cpp index 82a4010..f3481e9 100644 --- a/src/gui/app.cpp +++ b/src/gui/app.cpp @@ -10,6 +10,7 @@ // --- ---------- ------------------------------------------------------------- // JLH 12/23/2009 Created this file // JLH 01/21/2011 Added SDL initialization +// JLH 06/26/2011 Added fix to keep SDL from hijacking main() on win32 // #include "app.h" @@ -18,6 +19,7 @@ #include #include "log.h" #include "mainwin.h" +#include "settings.h" #include "types.h" #ifdef __GCCWIN32__ @@ -28,15 +30,25 @@ // Here's the main application loop--short and simple... int main(int argc, char * argv[]) { + // Normally, this would be read in from the settings module... :-P + vjs.hardwareTypeAlpine = false; + if (argc > 1) { - if (strcmp(argv[1], "--help") == 0) + if ((strcmp(argv[1], "--help") == 0) || (strcmp(argv[1], "-h") == 0) + || (strcmp(argv[1], "-?") == 0)) { printf("Virtual Jaguar 2.0.0 help\n"); printf("\n"); - printf("This is an experimental branch of Virtual Jaguar, how did you get it?\n"); + printf("Command line interface is non-functional ATM, but may return if there is\n" + "enough demand for it. :-)\n"); return 0; } + if ((strcmp(argv[1], "--alpine") == 0) || (strcmp(argv[1], "-a") == 0)) + { + printf("Alpine Mode enabled.\n"); + vjs.hardwareTypeAlpine = true; + } } Q_INIT_RESOURCE(virtualjaguar); // This must the same name as the exe filename @@ -57,6 +69,10 @@ int main(int argc, char * argv[]) WriteLog("VJ: SDL (joystick, audio) successfully initialized.\n"); App app(argc, argv); // Declare an instance of the application retVal = app.exec(); // And run it! + + // Free SDL components last...! + SDL_QuitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_AUDIO); + SDL_Quit(); } LogDone(); // Close logfile