X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fapp.cpp;h=1e36fe4c6450b2d515276aa2d039a0e19fe09aa9;hb=9b7c073bb2dd8392c5f1fd9373e6b8eb1ceab2d3;hp=e878edfc9c206836db892fc13cb7cf572038f230;hpb=ec553d06e2718a1c6c0d6bdfcd508ce1ba89c706;p=virtualjaguar diff --git a/src/gui/app.cpp b/src/gui/app.cpp index e878edf..1e36fe4 100644 --- a/src/gui/app.cpp +++ b/src/gui/app.cpp @@ -9,10 +9,12 @@ // Who When What // --- ---------- ------------------------------------------------------------- // JLH 12/23/2009 Created this file +// JLH 01/21/2011 Added SDL initialization // #include "app.h" +#include #include #include "log.h" #include "mainwin.h" @@ -38,9 +40,20 @@ int main(int argc, char * argv[]) //ick int id = qRegisterMetaType(); LogInit("virtualjaguar.log"); // Init logfile - App app(argc, argv); // Declare an instance of the application + int retVal = -1; // Default is failure + + // Set up SDL library + if (SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_AUDIO) < 0) + { + WriteLog("VJ: Could not initialize the SDL library: %s\n", SDL_GetError()); + } + else + { + WriteLog("VJ: SDL (joystick, audio) successfully initialized.\n"); + App app(argc, argv); // Declare an instance of the application + retVal = app.exec(); // And run it! + } - int retVal = app.exec(); // And run it! LogDone(); // Close logfile return retVal; }