Exemple #1
0
void SaveConfig() {
	FILE *f;

	/* TODO Error checking for the next two lines, and at least log
	   failures - suggest a file dialog to specify a new file or
	   create a new file */
	f = fopen(cfgfile, "w");
	if (f == NULL) return;

	SetValue("Bios", Config.Bios);
	SetValue("Gpu",  Config.Gpu);
	SetValue("Spu",  Config.Spu);
	SetValue("Cdr",  Config.Cdr);
#ifdef ENABLE_SIO1API
	SetValue("Sio1", Config.Sio1);
#endif
	SetValue("Net",  Config.Net);
	SetValue("Pad1", Config.Pad1);
	SetValue("Pad2", Config.Pad2);
	SetValue("Mcd1", Config.Mcd1);
	SetValue("Mcd2", Config.Mcd2);
	SetValue("BiosDir",    Config.BiosDir);
	SetValue("PluginsDir",    Config.PluginsDir);
	SetValue("IsoImgDir",  Config.IsoImgDir);

	SetValueb("Xa",      Config.Xa);
	SetValueb("SioIrq",  Config.SioIrq);
	SetValueb("Mdec",    Config.Mdec);
	SetValueb("PsxAuto", Config.PsxAuto);
	SetValuel("Cdda",    Config.Cdda);
	SetValueb("SlowBoot",Config.SlowBoot);
	SetValueb("Dbg",     Config.Debug);
	SetValueb("PsxOut",  Config.PsxOut);
	SetValueb("SpuIrq",  Config.SpuIrq);
	SetValueb("RCntFix", Config.RCntFix);
	SetValueb("VSyncWA", Config.VSyncWA);
	SetValueb("NoMemcard", Config.NoMemcard);
	SetValueb("Widescreen", Config.Widescreen);

	SetValuel("Cpu",     Config.Cpu);
	SetValuel("PsxType", Config.PsxType);
	SetValuel("RewindCount", Config.RewindCount);
	SetValuel("RewindInterval", Config.RewindInterval);

	fclose(f);
}
Exemple #2
0
void SaveConfig() {
	FILE *f;

	f = fopen(cfgfile,"w");
	if (f == NULL) return;

	SetValue("Bios", Config.Bios);
	SetValue("Gpu",  Config.Gpu);
	SetValue("Spu",  Config.Spu);
	SetValue("Cdr",  Config.Cdr);
	SetValue("Net",  Config.Net);
	SetValue("Pad1", Config.Pad1);
	SetValue("Pad2", Config.Pad2);
	SetValue("Mcd1", Config.Mcd1);
	SetValue("Mcd2", Config.Mcd2);
	SetValue("PluginsDir", Config.PluginsDir);
	SetValue("BiosDir",    Config.BiosDir);
	SetValuel("Xa",      Config.Xa);
	SetValuel("Sio",     Config.Sio);
	SetValuel("Mdec",    Config.Mdec);
	SetValuel("PsxAuto", Config.PsxAuto);
	SetValuel("PsxType", Config.PsxType);
	SetValuel("Cdda",    Config.Cdda);
	SetValuel("Cpu",     Config.Cpu);
	SetValuel("PsxOut",  Config.PsxOut);
	SetValuel("SpuIrq",  Config.SpuIrq);
	SetValuel("RCntFix", Config.RCntFix);
	SetValuel("VSyncWA", Config.VSyncWA);
	SetValue("Lang",    Config.Lang);

	fclose(f);
}