X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fsettings.cpp;h=b1f864fbdea01179801e0920f706b853a4de1ca7;hb=6f25f63a18153bc2adc49c5f9a3862c2760716df;hp=a0d5746dfb6499866cf9e24cc17fa0e3de71cac3;hpb=59ca39a29be645918de45bd144865ba6487f4009;p=virtualjaguar diff --git a/src/settings.cpp b/src/settings.cpp index a0d5746..b1f864f 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1,23 +1,31 @@ // // SETTINGS.CPP: Virtual Jaguar configuration loading/saving support // -// by James L. Hammons +// by James Hammons +// (C) 2010 Underground Software +// +// JLH = James Hammons +// +// Who When What +// --- ---------- ------------------------------------------------------------- +// JLH 01/16/2010 Created this log // -#include -#include -#include "SDL.h" -#include "types.h" -#include "sdlemu_config.h" -#include "log.h" #include "settings.h" +//#include +//#include +//#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); @@ -27,17 +35,23 @@ 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); @@ -84,12 +98,14 @@ void LoadVJSettings(void) 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... } // @@ -108,3 +124,4 @@ void CheckForTrailingSlash(char * path) if (path[strlen(path) - 1] != '/') strcat(path, "/"); // NOTE: Possible buffer overflow } +#endif