static menu_entry *cfg_opts[] = { opt_entries, opt2_entries, cdopt_entries };
static const int *cfg_opt_counts[] = { &opt_entry_count, &opt2_entry_count, &cdopt_entry_count };
-#define NL "\n"
+#define NL "\r\n"
static char *mystrip(char *str)
keys_write(fn, "bind_joy2", currentConfig.JoyBinds[2], defaultConfig.JoyBinds[2], joyKeyNames, 1);
keys_write(fn, "bind_joy3", currentConfig.JoyBinds[3], defaultConfig.JoyBinds[3], joyKeyNames, 1);
+ if (section == NULL)
+ fprintf(fn, "Sound Volume = %i" NL, currentConfig.volume);
+
fprintf(fn, NL);
if (fo != NULL)
if (strcasecmp(var, "LastUsedROM") == 0)
return; /* handled elsewhere */
+ if (strcasecmp(var, "Sound Volume") == 0) {
+ currentConfig.volume = atoi(val);
+ return;
+ }
+
// key binds
if (strncasecmp(var, "bind ", 5) == 0) {
keys_parse(var + 5, val, currentConfig.KeyBinds, keyNames);
\r
ret = -1;\r
if (config_havesect(cfg, sect)) {\r
+ int vol = currentConfig.volume;\r
emu_setDefaultConfig();\r
ret = config_readsect(cfg, sect);\r
+ currentConfig.volume = vol; // make vol global (bah)\r
}\r
\r
if (ret != 0)\r
vidConvCpyRGB32(localPal, Pico.cram, 0x40);\r
vidConvCpyRGB32sh(localPal+0x40, Pico.cram, 0x40);\r
vidConvCpyRGB32hi(localPal+0x80, Pico.cram, 0x40);\r
- blockcpy(localPal+0xc0, localPal+0x40, 0x40*4);\r
+ memcpy32(localPal+0xc0, localPal+0x40, 0x40);\r
localPal[0xc0] = 0x0000c000;\r
localPal[0xd0] = 0x00c00000;\r
localPal[0xe0] = 0x00000000; // reserved pixels for OSD\r