bool Emulator_Implementation_SaveSettings()
{
	currentconfig.SetInt("PS3General::ControlScheme",Settings.ControlScheme);
	currentconfig.SetBool("FCEU::GameGenie",Settings.FCEUGameGenie);
	currentconfig.SetBool("PS3General::KeepAspect",Settings.PS3KeepAspect);
	currentconfig.SetBool("PS3General::Smooth", Settings.PS3Smooth);
	currentconfig.SetBool("PS3General::OverscanEnabled", Settings.PS3OverscanEnabled);
	currentconfig.SetInt("PS3General::OverscanAmount",Settings.PS3OverscanAmount);
	currentconfig.SetInt("PS3General::Throttled",Settings.Throttled);
	currentconfig.SetBool("PS3General::PS3PALTemporalMode60Hz",Settings.PS3PALTemporalMode60Hz);
	currentconfig.SetInt("FCEU::Controlstyle",Settings.FCEUControlstyle);
	currentconfig.SetBool("FCEU::DisableSpriteLimitation",Settings.FCEUDisableSpriteLimitation);
	currentconfig.SetString("PS3General::PS3CurrentShader",Graphics->GetFragmentShaderPath());
	currentconfig.SetUInt("PS3General::PS3CurrentResolution",Graphics->GetCurrentResolution());
	currentconfig.SetString("PS3Paths::PathSaveStates",Settings.PS3PathSaveStates);
	currentconfig.SetString("PS3Paths::PathCheats",Settings.PS3PathCheats);
	currentconfig.SetString("PS3Paths::PathROMDirectory",Settings.PS3PathROMDirectory);
	currentconfig.SetString("PS3Paths::PathSRAM",Settings.PS3PathSRAM);
	currentconfig.SetString("PS3Paths::PathBaseDirectory",Settings.PS3PathBaseDirectory);
	currentconfig.SetString("PS3Paths::PathScreenshots",Settings.PS3PathScreenshots);
	currentconfig.SetString("RSound::RSoundServerIPAddress",Settings.RSoundServerIPAddress);
	currentconfig.SetBool("RSound::RSoundEnabled",Settings.RSoundEnabled);
	Emulator_Implementation_SaveCustomControls(false);
	return currentconfig.SaveTo(SYS_CONFIG_FILE);
}
Esempio n. 2
0
static bool	try_save(const char	*fname,	ConfigFile &conf){
	STREAM fp;
	if((fp=OPEN_STREAM(fname, "w"))!=NULL){
		fprintf(stdout,	"Saving	config file	%s\n", fname);
		CLOSE_STREAM(fp);
		conf.SaveTo(fname);
		return true;
	}
	return false;
}