// 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 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 10/09/2018 Added the Rx version's contact in the help text\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
}\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
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
" ---------------- -----------------------------------\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
}\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