X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fapp.cpp;h=7c2037f3a81273eb34e9ec6ddce8ac4cde59fc03;hb=f30bf746981a99079e766b0d4e9de5391a4175ff;hp=c407149d8c2d3a402cd146905b4833f93ed84341;hpb=331e68678795fd4fc90db4541417ee115053c3ec;p=virtualjaguar diff --git a/src/gui/app.cpp b/src/gui/app.cpp index c407149..7c2037f 100644 --- a/src/gui/app.cpp +++ b/src/gui/app.cpp @@ -1,10 +1,10 @@ // // app.cpp - Qt-based GUI for Virtual Jaguar // -// by James L. Hammons +// by James Hammons // (C) 2010 Underground Software // -// JLH = James L. Hammons +// JLH = James Hammons // // Who When What // --- ---------- ------------------------------------------------------------- @@ -19,6 +19,7 @@ #include #include "log.h" #include "mainwin.h" +#include "settings.h" #include "types.h" #ifdef __GCCWIN32__ @@ -29,6 +30,9 @@ // 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) || (strcmp(argv[1], "-h") == 0) @@ -36,10 +40,22 @@ int main(int argc, char * argv[]) { printf("Virtual Jaguar 2.0.0 help\n"); printf("\n"); - printf("Command line interface is non-functional ATM, but may return if there is\n" - "enough demand for it. :-)\n"); + printf("Command line interface is mostly non-functional ATM, but may return if\n" + "there is enough demand for it. :-)\n"); return 0; } + if (strcmp(argv[1], "--yarrr") == 0) + { + printf("\n"); + printf("Shiver me timbers!\n"); + printf("\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 @@ -47,9 +63,12 @@ int main(int argc, char * argv[]) // This is so we can pass this stuff using signal/slot mechanism... //ick int id = qRegisterMetaType(); - LogInit("virtualjaguar.log"); // Init logfile + bool success = (bool)LogInit("virtualjaguar.log"); // Init logfile int retVal = -1; // Default is failure + if (!success) + printf("Failed to open virtualjaguar.log for writing!\n"); + // Set up SDL library if (SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_AUDIO) < 0) {