+ if (info->blit_hw)
+ mainSurfaceFlags |= SDL_HWACCEL;
+ }
+
+ if (fullscreen)
+ mainSurfaceFlags |= SDL_FULLSCREEN;
+
+// mainSurface = SDL_SetVideoMode(tom_getVideoModeWidth(), tom_getVideoModeHeight(), 16, mainSurfaceFlags);
+//Testing purposes... :-)
+ mainSurface = SDL_SetVideoMode(tom_getVideoModeWidth()*2, tom_getVideoModeHeight()*2, 16, mainSurfaceFlags);
+
+ if (mainSurface == NULL)
+ {
+ WriteLog("VJ: SDL is unable to set the video mode: %s\n", SDL_GetError());
+ exit(1);
+ }
+
+ SDL_WM_SetCaption("Virtual Jaguar", "Virtual Jaguar");
+
+ // Create the primary SDL display (16 BPP, 5/5/5 RGB format)
+ surface = SDL_CreateRGBSurface(SDL_SWSURFACE, tom_getVideoModeWidth(),
+ tom_getVideoModeHeight(), 16, 0x7C00, 0x03E0, 0x001F, 0);
+
+ if (surface == NULL)
+ {
+ WriteLog("VJ: Could not create primary SDL surface: %s\n", SDL_GetError());
+ exit(1);
+ }
+
+ if (useOpenGL)
+// sdlemu_init_opengl(surface, 1/*method*/, 1/*size*/, 0/*texture type (linear, nearest)*/);
+//Testing purposes... :-)
+ sdlemu_init_opengl(surface, 1/*method*/, 2/*size*/, 0/*texture type (linear, nearest)*/);
+
+ // Initialize Joystick support under SDL
+ if (useJoystick)
+ {
+ if (SDL_NumJoysticks() <= 0)