core: Fix libdwarf and Qt build failure
[clinton/Virtual-Jaguar-Rx.git] / src / gui / app.cpp
index 6eb8493..bc56752 100644 (file)
 // JLH  01/21/2011  Added SDL initialization\r
 // JLH  06/26/2011  Added fix to keep SDL from hijacking main() on win32\r
 // JLH  05/24/2012  Added option switches\r
-// JLH  03/05/2013  Fixed console redireciton on win32 platform  :-P\r
-// JPM  06/06/2016  Visual Studio support\r
-// JPM  06/19/2016  Soft debugger support (--debugger)\r
+// JLH  03/05/2013  Fixed console redirection on win32 platform  :-P\r
+// JPM  Sept./2016  Visual Studio support, and Soft debugger support (--debugger)\r
 // JPM  09/  /2017  Added option (--dram-max) to support 8MB ram (which doesn't exist)\r
-// JPM  09/06/2017  Added the 'Rx' word to the emulator name and updated the credits line\r
-// JPM  09/08/2017  Added option (--es-all, --es-ui, --es-alpine & --es-debugger) to support the erase settings\r
+// JPM  Sept./2017  Added the 'Rx' word to the emulator name, updated the credits line, added option (--es-all, --es-ui, --es-alpine & --es-debugger) to support the erase settings\r
+// JPM   Oct./2018  Added the Rx version's contact in the help text, added timer initialisation in the SDL_Init\r
+// JPM   Apr./2019  Fixed a command line option duplication\r
 //\r
 \r
 #include "app.h"\r
 \r
 #include <SDL.h>\r
-#include <QApplication>\r
+#include <QtWidgets/QApplication>\r
 #include "gamepad.h"\r
 #include "log.h"\r
 #include "mainwin.h"\r
@@ -107,7 +107,7 @@ int main(int argc, char * argv[])
        }\r
 \r
        // Set up SDL library\r
-       if (SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_AUDIO) < 0)\r
+       if (SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_AUDIO | SDL_INIT_TIMER) < 0)\r
        {\r
                WriteLog("VJ: Could not initialize the SDL library: %s\n", SDL_GetError());\r
        }\r
@@ -174,11 +174,12 @@ bool ParseCommandLine(int argc, char * argv[])
                if ((strcmp(argv[i], "--help") == 0) || (strcmp(argv[i], "-h") == 0) || (strcmp(argv[i], "-?") == 0))\r
                {\r
                        printf(\r
-                               "Virtual Jaguar " VJ_RELEASE_VERSION " (" VJ_RELEASE_SUBVERSION ") Rx\n"\r
+                               "Virtual Jaguar " VJ_RELEASE_VERSION " (" VJ_RELEASE_SUBVERSION ") Rx - " __DATE__ "\n"\r
                                "Based upon Virtual Jaguar core v1.0.0 by David Raingeard.\n"\r
                                "Based upon the work by James Hammons (Linux/WIN32), Niels Wagenaar (Linux/WIN32),\n"\r
                                "Carwin Jones (BeOS), and Adam Green (MacOS)\n"\r
                                "Contact: http://sdlemu.ngemu.com/ | sdlemu@ngemu.com\n"\r
+                               "Contact: https://github.com/djipi/Virtual-Jaguar-Rx | djipi.mari@gmail.com\n"\r
                                "\n"\r
                                "Usage:\n"\r
                                "   virtualjaguar [<filename>] [switches]\n"\r
@@ -187,7 +188,7 @@ bool ParseCommandLine(int argc, char * argv[])
                                "   ----------------  -----------------------------------\n"\r
                                "   <filename>        Name of file to autoload\n"\r
                                "   --alpine      -a  Put Virtual Jaguar into Alpine mode\n"\r
-                               "   --debugger    -d  Put Virtual Jaguar into Debugger mode\n"\r
+                               "   --debugger    -D  Put Virtual Jaguar into Debugger mode\n"\r
                                "   --pal         -p  PAL mode\n"\r
                                "   --ntsc        -n  NTSC mode\n"\r
                                "   --dram-max        Set DRAM size to 8MB\n"\r
@@ -252,7 +253,7 @@ bool ParseCommandLine(int argc, char * argv[])
                }\r
 \r
                // Debugger mode\r
-               if ((strcmp(argv[i], "--debugger") == 0) || (strcmp(argv[i], "-d") == 0))\r
+               if ((strcmp(argv[i], "--debugger") == 0) || (strcmp(argv[i], "-D") == 0))\r
                {\r
                        printf("Debugger mode enabled.\n");\r
                        vjs.softTypeDebugger = true;\r