void Emulator_Implementation_SwitchControlScheme() { switch(Settings.ControlScheme) { case CONTROL_SCHEME_DEFAULT: Emulator_Implementation_ButtonMappingSettings(MAP_BUTTONS_OPTION_DEFAULT); break; case CONTROL_SCHEME_NEW: Emulator_Implementation_ButtonMappingSettings(MAP_BUTTONS_OPTION_NEW); break; case CONTROL_SCHEME_CUSTOM: Emulator_Implementation_ButtonMappingSettings(MAP_BUTTONS_OPTION_GETTER); break; } }
void Emulator_Implementation_SaveCustomControls(bool showdialog) { if(Settings.ControlScheme == CONTROL_SCHEME_CUSTOM) { if(showdialog) { dialog_is_running = true; cellMsgDialogOpen2(CELL_MSGDIALOG_DIALOG_TYPE_NORMAL|\ CELL_MSGDIALOG_TYPE_BG_VISIBLE|\ CELL_MSGDIALOG_TYPE_BUTTON_TYPE_YESNO|\ CELL_MSGDIALOG_TYPE_DISABLE_CANCEL_OFF|\ CELL_MSGDIALOG_TYPE_DEFAULT_CURSOR_YES,\ "Do you want to save the custom controller settings?",\ cb_save_custom_controls,NULL,NULL); while(dialog_is_running && Emulator_ROMRunning()) { Graphics->Clear(); Graphics->Swap(); cellSysutilCheckCallback(); } } if(!showdialog || Settings.SaveCustomControlScheme) { Emulator_Implementation_ButtonMappingSettings(MAP_BUTTONS_OPTION_SETTER); } } }
bool Emulator_SaveSettings() { if (currentconfig != NULL) { currentconfig->SetBool("PS3General::DisplayFrameRate",Settings.DisplayFrameRate); 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::PS3FontSize",Settings.PS3FontSize); currentconfig->SetBool("PS3General::PS3PALTemporalMode60Hz",Settings.PS3PALTemporalMode60Hz); currentconfig->SetString("PS3General::Shader",Graphics->GetFragmentShaderPath()); currentconfig->SetString("PS3Paths::PathSaveStates",Settings.PS3PathSaveStates); currentconfig->SetString("PS3Paths::PathROMDirectory",Settings.PS3PathROMDirectory); currentconfig->SetString("PS3Paths::PathSRAM",Settings.PS3PathSRAM); currentconfig->SetString("RSound::RSoundServerIPAddress",Settings.RSoundServerIPAddress); currentconfig->SetBool("RSound::RSoundEnabled",Settings.RSoundEnabled); currentconfig->SetInt("GenesisPlus::SixButtonPad",Settings.SixButtonPad); currentconfig->SetString("GenesisPlus::BIOS",Settings.BIOS); Emulator_Implementation_ButtonMappingSettings(MAP_BUTTONS_OPTION_SETTER); return currentconfig->SaveTo(SYS_CONFIG_FILE); } return false; }
bool Emulator_InitSettings() { LOG_DBG("Emulator_InitSettings()\n"); if (currentconfig == NULL) { currentconfig = new ConfigFile(); } memset((&Settings), 0, (sizeof(Settings))); currentconfig->Clear(); try_load_config_file(SYS_CONFIG_FILE, *currentconfig); //PS3 - General settings if (currentconfig->Exists("PS3General::KeepAspect")) { Settings.PS3KeepAspect = currentconfig->GetBool("PS3General::KeepAspect"); } else { Settings.PS3KeepAspect = true; } Graphics->SetAspectRatio(Settings.PS3KeepAspect); if (currentconfig->Exists("PS3General::Smooth")) { Settings.PS3Smooth = currentconfig->GetBool("PS3General::Smooth"); } else { Settings.PS3Smooth = false; } Graphics->SetSmooth(Settings.PS3Smooth); if (currentconfig->Exists("PS3General::OverscanEnabled")) { Settings.PS3OverscanEnabled = currentconfig->GetBool("PS3General::OverscanEnabled"); } else { Settings.PS3OverscanEnabled = false; } if (currentconfig->Exists("PS3General::OverscanAmount")) { Settings.PS3OverscanAmount = currentconfig->GetInt("PS3General::OverscanAmount"); } else { Settings.PS3OverscanAmount = 0; } Graphics->SetOverscan(Settings.PS3OverscanEnabled, (float)Settings.PS3OverscanAmount/100); if (currentconfig->Exists("GenesisPlus::SixButtonPad")) { Settings.SixButtonPad = currentconfig->GetBool("GenesisPlus::SixButtonPad"); } else { Settings.SixButtonPad = FALSE; } if (currentconfig->Exists("PS3General::DisplayFrameRate")) { Settings.DisplayFrameRate = currentconfig->GetBool("PS3General::DisplayFrameRate"); } else { Settings.DisplayFrameRate = false; } if (currentconfig->Exists("PS3General::Shader")) { Graphics->LoadFragmentShader(currentconfig->GetString("PS3General::Shader")); } else { Graphics->LoadFragmentShader(DEFAULT_SHADER_FILE); } if (currentconfig->Exists("GenesisPlus::BIOS")) { Settings.BIOS = currentconfig->GetString("GenesisPlus::BIOS"); } else { Settings.BIOS = "/dev_hdd0/game/GENP00001/USRDIR/bios.bin"; } if (currentconfig->Exists("PS3General::PS3PALTemporalMode60Hz")) { Settings.PS3PALTemporalMode60Hz = currentconfig->GetBool("PS3General::PS3PALTemporalMode60Hz"); Graphics->SetPAL60Hz(Settings.PS3PALTemporalMode60Hz); } else { Settings.PS3PALTemporalMode60Hz = false; Graphics->SetPAL60Hz(Settings.PS3PALTemporalMode60Hz); } //RSound Settings if(currentconfig->Exists("RSound::RSoundEnabled")) { Settings.RSoundEnabled = currentconfig->GetBool("RSound::RSoundEnabled"); } else { Settings.RSoundEnabled = false; } if(currentconfig->Exists("RSound::RSoundServerIPAddress")) { Settings.RSoundServerIPAddress = currentconfig->GetString("RSound::RSoundServerIPAddress"); } else { Settings.RSoundServerIPAddress = "0.0.0.0"; } if(currentconfig->Exists("PS3General::PS3FontSize")) { Settings.PS3FontSize = currentconfig->GetInt("PS3General::PS3FontSize"); } else { Settings.PS3FontSize = 100; } // PS3 Path Settings if (currentconfig->Exists("PS3Paths::PathSaveStates")) { Settings.PS3PathSaveStates = currentconfig->GetString("PS3Paths::PathSaveStates"); } else { Settings.PS3PathSaveStates = "/dev_hdd0/game/GENP00001/USRDIR/"; } if (currentconfig->Exists("PS3Paths::PathSRAM")) { Settings.PS3PathSRAM = currentconfig->GetString("PS3Paths::PathSRAM"); } else { Settings.PS3PathSRAM = "/dev_hdd0/game/GENP00001/USRDIR/"; } /* if (currentconfig->Exists("PS3Paths::PathScreenshots")) { Settings.PS3PathScreenshots = currentconfig->GetString("PS3Paths::PathScreenshots"); } */ if (currentconfig->Exists("PS3Paths::PathROMDirectory")) { Settings.PS3PathROMDirectory = currentconfig->GetString("PS3Paths::PathROMDirectory"); } else { Settings.PS3PathROMDirectory = "/\0"; } if (currentconfig->Exists("GenesisPlus::ActionReplayROMPath")) { Settings.GameGenieROMPath = currentconfig->GetString("GenesisPlus::ActionReplayROMPath"); } else { Settings.ActionReplayROMPath.assign("/dev_hdd0/game/GENP00001/USRDIR/areplay.bin"); } if (currentconfig->Exists("GenesisPlus::GameGenieROMPath")) { Settings.GameGenieROMPath = currentconfig->GetString("GenesisPlus::GameGenieROMPath"); } else { Settings.GameGenieROMPath.assign("/dev_hdd0/game/GENP00001/USRDIR/ggenie.bin"); } if (currentconfig->Exists("GenesisPlus::SKROMPath")) { Settings.SKROMPath = currentconfig->GetString("GenesisPlus::SKROMPath"); } else { Settings.SKROMPath.assign("/dev_hdd0/game/GENP00001/USRDIR/sk.bin"); } if (currentconfig->Exists("GenesisPlus::SKUpmemROMPath")) { Settings.SKUpmemROMPath = currentconfig->GetString("GenesisPlus::SKUpmemROMPath"); } else { Settings.SKUpmemROMPath.assign("/dev_hdd0/game/GENP00001/USRDIR/sk2chip.bin"); } if (currentconfig->Exists("GenesisPlus::ExtraCart")) { Settings.ExtraCart = currentconfig->GetBool("GenesisPlus::ExtraCart"); } else { Settings.ExtraCart = false; } Emulator_SetExtraCartPaths(); Emulator_Implementation_ButtonMappingSettings(MAP_BUTTONS_OPTION_GETTER); LOG_DBG("SUCCESS - Emulator_InitSettings()\n"); return true; }