//
// SETTINGS.CPP: Virtual Jaguar configuration loading/saving support
//
-// by James L. Hammons
+// by James Hammons
+// (C) 2010 Underground Software
+//
+// JLH = James Hammons <jlhamm@acm.org>
+//
+// Who When What
+// --- ---------- -------------------------------------------------------------
+// JLH 01/16/2010 Created this log
//
-#include <stdlib.h>
-#include <string>
-#include "SDL.h"
-#include "types.h"
-#include "sdlemu_config.h"
-#include "log.h"
#include "settings.h"
+//#include <stdlib.h>
+//#include <string>
+//#include "SDL.h"
+//#include "sdlemu_config.h"
+//#include "log.h"
+
using namespace std;
// Global variables
VJSettings vjs;
+#if 0
// Private function prototypes
void CheckForTrailingSlash(char * path);
//
void LoadVJSettings(void)
{
- sdlemu_init_config("vj.cfg");
+ if (sdlemu_init_config("./vj.cfg") == 0 // CWD
+ && sdlemu_init_config("~/vj.cfg") == 0 // Home
+ && sdlemu_init_config("~/.vj/vj.cfg") == 0 // Home under .vj directory
+ && sdlemu_init_config("vj.cfg") == 0) // Somewhere in the path
+ WriteLog("Settings: Couldn't find VJ configuration file. Using defaults...\n");
vjs.useJoystick = sdlemu_getval_bool("useJoystick", false);
vjs.joyport = sdlemu_getval_int("joyport", 0);
vjs.hardwareTypeNTSC = sdlemu_getval_bool("hardwareTypeNTSC", true);
+ vjs.frameSkip = sdlemu_getval_int("frameSkip", 0);
vjs.useJaguarBIOS = sdlemu_getval_bool("useJaguarBIOS", false);
vjs.DSPEnabled = sdlemu_getval_bool("DSPEnabled", false);
- vjs.usePipelinedDSP = sdlemu_getval_bool("usePipelinedDSP", true);
+ vjs.usePipelinedDSP = sdlemu_getval_bool("usePipelinedDSP", false);
vjs.fullscreen = sdlemu_getval_bool("fullscreen", false);
vjs.useOpenGL = sdlemu_getval_bool("useOpenGL", true);
vjs.glFilter = sdlemu_getval_int("glFilterType", 0);
+ vjs.renderType = sdlemu_getval_int("renderType", 0);
// Keybindings in order of U, D, L, R, C, B, A, Op, Pa, 0-9, #, *
vjs.p1KeyBindings[0] = sdlemu_getval_int("p1k_up", SDLK_UP);
vjs.p2KeyBindings[19] = sdlemu_getval_int("p2k_pound", SDLK_KP_DIVIDE);
vjs.p2KeyBindings[20] = sdlemu_getval_int("p2k_star", SDLK_KP_MULTIPLY);
- strcpy(vjs.jagBootPath, sdlemu_getval_string("JagBootROM", "./bios/jagboot.rom"));
- strcpy(vjs.CDBootPath, sdlemu_getval_string("CDBootROM", "./bios/jagcd.rom"));
- strcpy(vjs.EEPROMPath, sdlemu_getval_string("EEPROMs", "./eeproms/"));
- strcpy(vjs.ROMPath, sdlemu_getval_string("ROMs", "./"));
+ strcpy(vjs.jagBootPath, sdlemu_getval_string("JagBootROM", "./BIOS/jagboot.rom"));
+ strcpy(vjs.CDBootPath, sdlemu_getval_string("CDBootROM", "./BIOS/jagcd.rom"));
+ strcpy(vjs.EEPROMPath, sdlemu_getval_string("EEPROMs", "./EEPROMs"));
+ strcpy(vjs.ROMPath, sdlemu_getval_string("ROMs", "./ROMs"));
CheckForTrailingSlash(vjs.EEPROMPath);
CheckForTrailingSlash(vjs.ROMPath);
+
+ vjs.hardwareTypeAlpine = false; // No external setting for this yet...
}
//
if (path[strlen(path) - 1] != '/')
strcat(path, "/"); // NOTE: Possible buffer overflow
}
+#endif