]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/app.cpp
Added possibility to run DSP without host audio output, added configure options
[virtualjaguar] / src / gui / app.cpp
index 82a4010160e8503f2969ff4c732ddccff2aa02cd..c407149d8c2d3a402cd146905b4833f93ed84341 100644 (file)
@@ -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"
@@ -30,11 +31,13 @@ int main(int argc, char * argv[])
 {
        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;
                }
        }
@@ -57,6 +60,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