X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=common%2Femu.c;h=723dfb74050e3d8c79a37a3c72353f694f117925;hb=f3dc5a3a95396bd5b156678769b4434c123a9880;hp=99fca4979005f145e3d32b78012a2f472c8969e4;hpb=f013066e974c7d35b818a6fca43a9deba1ce5c3e;p=libpicofe.git diff --git a/common/emu.c b/common/emu.c index 99fca49..723dfb7 100644 --- a/common/emu.c +++ b/common/emu.c @@ -446,12 +446,13 @@ int emu_ReadConfig(int game, int no_defaults) if (currentConfig.CPUclock < 10 || currentConfig.CPUclock > 4096) currentConfig.CPUclock = 200; if (currentConfig.gamma < 10 || currentConfig.gamma > 300) currentConfig.gamma = 100; if (currentConfig.volume < 0 || currentConfig.volume > 99) currentConfig.volume = 50; +#ifdef __GP2X__ // if volume keys are unbound, bind them to volume control if (!currentConfig.KeyBinds[23] && !currentConfig.KeyBinds[22]) { currentConfig.KeyBinds[23] = 1<<29; // vol up currentConfig.KeyBinds[22] = 1<<30; // vol down } - +#endif if (bread > 0) config_slot_current = config_slot; return (bread > 0); // == sizeof(currentConfig)); } @@ -686,7 +687,8 @@ int emu_SaveLoadGame(int load, int sram) lprintf("saveLoad (%i, %i): %s\n", load, sram, saveFname); - if(sram) { + if (sram) + { FILE *sramFile; int sram_size; unsigned char *sram_data; @@ -739,10 +741,11 @@ int emu_SaveLoadGame(int load, int sram) else { void *PmovFile = NULL; - if (strcmp(saveFname + strlen(saveFname) - 3, ".gz") == 0) { + if (strcmp(saveFname + strlen(saveFname) - 3, ".gz") == 0) + { if( (PmovFile = gzopen(saveFname, load ? "rb" : "wb")) ) { emu_setSaveStateCbs(1); - if(!load) gzsetparams(PmovFile, 9, Z_DEFAULT_STRATEGY); + if (!load) gzsetparams(PmovFile, 9, Z_DEFAULT_STRATEGY); } } else