|
|
|
|
@ -428,7 +428,7 @@ void Settings::Load(SettingsInterface& si)
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Settings::Save(SettingsInterface& si) const
|
|
|
|
|
void Settings::Save(SettingsInterface& si, bool ignore_base) const
|
|
|
|
|
{
|
|
|
|
|
si.SetStringValue("Console", "Region", GetConsoleRegionName(region));
|
|
|
|
|
si.SetBoolValue("Console", "Enable8MBRAM", enable_8mb_ram);
|
|
|
|
|
@ -436,22 +436,27 @@ void Settings::Save(SettingsInterface& si) const
|
|
|
|
|
si.SetFloatValue("Main", "EmulationSpeed", emulation_speed);
|
|
|
|
|
si.SetFloatValue("Main", "FastForwardSpeed", fast_forward_speed);
|
|
|
|
|
si.SetFloatValue("Main", "TurboSpeed", turbo_speed);
|
|
|
|
|
si.SetBoolValue("Main", "SyncToHostRefreshRate", sync_to_host_refresh_rate);
|
|
|
|
|
si.SetBoolValue("Main", "IncreaseTimerResolution", increase_timer_resolution);
|
|
|
|
|
si.SetBoolValue("Main", "InhibitScreensaver", inhibit_screensaver);
|
|
|
|
|
si.SetBoolValue("Main", "StartPaused", start_paused);
|
|
|
|
|
si.SetBoolValue("Main", "StartFullscreen", start_fullscreen);
|
|
|
|
|
si.SetBoolValue("Main", "PauseOnFocusLoss", pause_on_focus_loss);
|
|
|
|
|
si.SetBoolValue("Main", "SaveStateOnExit", save_state_on_exit);
|
|
|
|
|
si.SetBoolValue("Main", "CreateSaveStateBackups", create_save_state_backups);
|
|
|
|
|
si.SetBoolValue("Main", "CompressSaveStates", compress_save_states);
|
|
|
|
|
si.SetBoolValue("Main", "ConfirmPowerOff", confim_power_off);
|
|
|
|
|
|
|
|
|
|
if (!ignore_base)
|
|
|
|
|
{
|
|
|
|
|
si.SetBoolValue("Main", "SyncToHostRefreshRate", sync_to_host_refresh_rate);
|
|
|
|
|
si.SetBoolValue("Main", "IncreaseTimerResolution", increase_timer_resolution);
|
|
|
|
|
si.SetBoolValue("Main", "InhibitScreensaver", inhibit_screensaver);
|
|
|
|
|
si.SetBoolValue("Main", "StartPaused", start_paused);
|
|
|
|
|
si.SetBoolValue("Main", "StartFullscreen", start_fullscreen);
|
|
|
|
|
si.SetBoolValue("Main", "PauseOnFocusLoss", pause_on_focus_loss);
|
|
|
|
|
si.SetBoolValue("Main", "SaveStateOnExit", save_state_on_exit);
|
|
|
|
|
si.SetBoolValue("Main", "CreateSaveStateBackups", create_save_state_backups);
|
|
|
|
|
si.SetBoolValue("Main", "CompressSaveStates", compress_save_states);
|
|
|
|
|
si.SetBoolValue("Main", "ConfirmPowerOff", confim_power_off);
|
|
|
|
|
si.SetBoolValue("Main", "ApplyCompatibilitySettings", apply_compatibility_settings);
|
|
|
|
|
si.SetBoolValue("Main", "ApplyGameSettings", apply_game_settings);
|
|
|
|
|
si.SetBoolValue("Main", "EnableDiscordPresence", enable_discord_presence);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
si.SetBoolValue("Main", "LoadDevicesFromSaveStates", load_devices_from_save_states);
|
|
|
|
|
si.SetBoolValue("Main", "ApplyCompatibilitySettings", apply_compatibility_settings);
|
|
|
|
|
si.SetBoolValue("Main", "ApplyGameSettings", apply_game_settings);
|
|
|
|
|
si.SetBoolValue("Console", "EnableCheats", enable_cheats);
|
|
|
|
|
si.SetBoolValue("Main", "DisableAllEnhancements", disable_all_enhancements);
|
|
|
|
|
si.SetBoolValue("Main", "EnableDiscordPresence", enable_discord_presence);
|
|
|
|
|
si.SetBoolValue("Main", "RewindEnable", rewind_enable);
|
|
|
|
|
si.SetFloatValue("Main", "RewindFrequency", rewind_save_frequency);
|
|
|
|
|
si.SetIntValue("Main", "RewindSaveSlots", rewind_save_slots);
|
|
|
|
|
@ -470,12 +475,17 @@ void Settings::Save(SettingsInterface& si) const
|
|
|
|
|
si.SetStringValue("GPU", "Adapter", gpu_adapter.c_str());
|
|
|
|
|
si.SetIntValue("GPU", "ResolutionScale", static_cast<long>(gpu_resolution_scale));
|
|
|
|
|
si.SetIntValue("GPU", "Multisamples", static_cast<long>(gpu_multisamples));
|
|
|
|
|
si.SetBoolValue("GPU", "UseDebugDevice", gpu_use_debug_device);
|
|
|
|
|
si.SetBoolValue("GPU", "DisableShaderCache", gpu_disable_shader_cache);
|
|
|
|
|
si.SetBoolValue("GPU", "DisableDualSourceBlend", gpu_disable_dual_source_blend);
|
|
|
|
|
si.SetBoolValue("GPU", "DisableFramebufferFetch", gpu_disable_framebuffer_fetch);
|
|
|
|
|
si.SetBoolValue("GPU", "DisableTextureBuffers", gpu_disable_texture_buffers);
|
|
|
|
|
si.SetBoolValue("GPU", "DisableTextureCopyToSelf", gpu_disable_texture_copy_to_self);
|
|
|
|
|
|
|
|
|
|
if (!ignore_base)
|
|
|
|
|
{
|
|
|
|
|
si.SetBoolValue("GPU", "UseDebugDevice", gpu_use_debug_device);
|
|
|
|
|
si.SetBoolValue("GPU", "DisableShaderCache", gpu_disable_shader_cache);
|
|
|
|
|
si.SetBoolValue("GPU", "DisableDualSourceBlend", gpu_disable_dual_source_blend);
|
|
|
|
|
si.SetBoolValue("GPU", "DisableFramebufferFetch", gpu_disable_framebuffer_fetch);
|
|
|
|
|
si.SetBoolValue("GPU", "DisableTextureBuffers", gpu_disable_texture_buffers);
|
|
|
|
|
si.SetBoolValue("GPU", "DisableTextureCopyToSelf", gpu_disable_texture_copy_to_self);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
si.SetBoolValue("GPU", "PerSampleShading", gpu_per_sample_shading);
|
|
|
|
|
si.SetBoolValue("GPU", "UseThread", gpu_use_thread);
|
|
|
|
|
si.SetBoolValue("GPU", "ThreadedPresentation", gpu_threaded_presentation);
|
|
|
|
|
@ -521,21 +531,25 @@ void Settings::Save(SettingsInterface& si) const
|
|
|
|
|
si.SetUIntValue("Display", "ScreenshotQuality", display_screenshot_quality);
|
|
|
|
|
si.SetIntValue("Display", "CustomAspectRatioNumerator", display_aspect_ratio_custom_numerator);
|
|
|
|
|
si.GetIntValue("Display", "CustomAspectRatioDenominator", display_aspect_ratio_custom_denominator);
|
|
|
|
|
si.SetBoolValue("Display", "ShowOSDMessages", display_show_osd_messages);
|
|
|
|
|
si.SetBoolValue("Display", "ShowFPS", display_show_fps);
|
|
|
|
|
si.SetBoolValue("Display", "ShowSpeed", display_show_speed);
|
|
|
|
|
si.SetBoolValue("Display", "ShowResolution", display_show_resolution);
|
|
|
|
|
si.SetBoolValue("Display", "ShowGPUStatistics", display_show_gpu_stats);
|
|
|
|
|
si.SetBoolValue("Display", "ShowCPU", display_show_cpu_usage);
|
|
|
|
|
si.SetBoolValue("Display", "ShowGPU", display_show_gpu_usage);
|
|
|
|
|
si.SetBoolValue("Display", "ShowFrameTimes", display_show_frame_times);
|
|
|
|
|
si.SetBoolValue("Display", "ShowStatusIndicators", display_show_status_indicators);
|
|
|
|
|
si.SetBoolValue("Display", "ShowInputs", display_show_inputs);
|
|
|
|
|
si.SetBoolValue("Display", "ShowEnhancements", display_show_enhancements);
|
|
|
|
|
if (!ignore_base)
|
|
|
|
|
{
|
|
|
|
|
si.SetBoolValue("Display", "ShowOSDMessages", display_show_osd_messages);
|
|
|
|
|
si.SetBoolValue("Display", "ShowFPS", display_show_fps);
|
|
|
|
|
si.SetBoolValue("Display", "ShowSpeed", display_show_speed);
|
|
|
|
|
si.SetBoolValue("Display", "ShowResolution", display_show_resolution);
|
|
|
|
|
si.SetBoolValue("Display", "ShowGPUStatistics", display_show_gpu_stats);
|
|
|
|
|
si.SetBoolValue("Display", "ShowCPU", display_show_cpu_usage);
|
|
|
|
|
si.SetBoolValue("Display", "ShowGPU", display_show_gpu_usage);
|
|
|
|
|
si.SetBoolValue("Display", "ShowFrameTimes", display_show_frame_times);
|
|
|
|
|
si.SetBoolValue("Display", "ShowStatusIndicators", display_show_status_indicators);
|
|
|
|
|
si.SetBoolValue("Display", "ShowInputs", display_show_inputs);
|
|
|
|
|
si.SetBoolValue("Display", "ShowEnhancements", display_show_enhancements);
|
|
|
|
|
si.SetFloatValue("Display", "OSDScale", display_osd_scale);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
si.SetBoolValue("Display", "DisplayAllFrames", display_all_frames);
|
|
|
|
|
si.SetBoolValue("Display", "StretchVertically", display_stretch_vertically);
|
|
|
|
|
si.SetFloatValue("Display", "MaxFPS", display_max_fps);
|
|
|
|
|
si.SetFloatValue("Display", "OSDScale", display_osd_scale);
|
|
|
|
|
|
|
|
|
|
si.SetIntValue("CDROM", "ReadaheadSectors", cdrom_readahead_sectors);
|
|
|
|
|
si.SetStringValue("CDROM", "MechaconVersion", GetCDROMMechVersionName(cdrom_mechacon_version));
|
|
|
|
|
@ -558,10 +572,14 @@ void Settings::Save(SettingsInterface& si) const
|
|
|
|
|
si.SetBoolValue("Audio", "DumpOnBoot", audio_dump_on_boot);
|
|
|
|
|
|
|
|
|
|
si.SetBoolValue("Hacks", "UseOldMDECRoutines", use_old_mdec_routines);
|
|
|
|
|
si.SetIntValue("Hacks", "DMAMaxSliceTicks", dma_max_slice_ticks);
|
|
|
|
|
si.SetIntValue("Hacks", "DMAHaltTicks", dma_halt_ticks);
|
|
|
|
|
si.SetIntValue("Hacks", "GPUFIFOSize", gpu_fifo_size);
|
|
|
|
|
si.SetIntValue("Hacks", "GPUMaxRunAhead", gpu_max_run_ahead);
|
|
|
|
|
|
|
|
|
|
if (!ignore_base)
|
|
|
|
|
{
|
|
|
|
|
si.SetIntValue("Hacks", "DMAMaxSliceTicks", dma_max_slice_ticks);
|
|
|
|
|
si.SetIntValue("Hacks", "DMAHaltTicks", dma_halt_ticks);
|
|
|
|
|
si.SetIntValue("Hacks", "GPUFIFOSize", gpu_fifo_size);
|
|
|
|
|
si.SetIntValue("Hacks", "GPUMaxRunAhead", gpu_max_run_ahead);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
si.SetBoolValue("PCDrv", "Enabled", pcdrv_enable);
|
|
|
|
|
si.SetBoolValue("PCDrv", "EnableWrites", pcdrv_enable_writes);
|
|
|
|
|
@ -603,23 +621,26 @@ void Settings::Save(SettingsInterface& si) const
|
|
|
|
|
si.SetIntValue("Cheevos", "NotificationsDuration", achievements_notification_duration);
|
|
|
|
|
si.SetIntValue("Cheevos", "LeaderboardsDuration", achievements_leaderboard_duration);
|
|
|
|
|
|
|
|
|
|
si.SetStringValue("Logging", "LogLevel", GetLogLevelName(log_level));
|
|
|
|
|
si.SetStringValue("Logging", "LogFilter", log_filter.c_str());
|
|
|
|
|
si.SetBoolValue("Logging", "LogTimestamps", log_timestamps);
|
|
|
|
|
si.SetBoolValue("Logging", "LogToConsole", log_to_console);
|
|
|
|
|
si.SetBoolValue("Logging", "LogToDebug", log_to_debug);
|
|
|
|
|
si.SetBoolValue("Logging", "LogToWindow", log_to_window);
|
|
|
|
|
si.SetBoolValue("Logging", "LogToFile", log_to_file);
|
|
|
|
|
|
|
|
|
|
si.SetBoolValue("Debug", "ShowVRAM", debugging.show_vram);
|
|
|
|
|
si.SetBoolValue("Debug", "DumpCPUToVRAMCopies", debugging.dump_cpu_to_vram_copies);
|
|
|
|
|
si.SetBoolValue("Debug", "DumpVRAMToCPUCopies", debugging.dump_vram_to_cpu_copies);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowGPUState", debugging.show_gpu_state);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowCDROMState", debugging.show_cdrom_state);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowSPUState", debugging.show_spu_state);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowTimersState", debugging.show_timers_state);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowMDECState", debugging.show_mdec_state);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowDMAState", debugging.show_dma_state);
|
|
|
|
|
if (!ignore_base)
|
|
|
|
|
{
|
|
|
|
|
si.SetStringValue("Logging", "LogLevel", GetLogLevelName(log_level));
|
|
|
|
|
si.SetStringValue("Logging", "LogFilter", log_filter.c_str());
|
|
|
|
|
si.SetBoolValue("Logging", "LogTimestamps", log_timestamps);
|
|
|
|
|
si.SetBoolValue("Logging", "LogToConsole", log_to_console);
|
|
|
|
|
si.SetBoolValue("Logging", "LogToDebug", log_to_debug);
|
|
|
|
|
si.SetBoolValue("Logging", "LogToWindow", log_to_window);
|
|
|
|
|
si.SetBoolValue("Logging", "LogToFile", log_to_file);
|
|
|
|
|
|
|
|
|
|
si.SetBoolValue("Debug", "ShowVRAM", debugging.show_vram);
|
|
|
|
|
si.SetBoolValue("Debug", "DumpCPUToVRAMCopies", debugging.dump_cpu_to_vram_copies);
|
|
|
|
|
si.SetBoolValue("Debug", "DumpVRAMToCPUCopies", debugging.dump_vram_to_cpu_copies);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowGPUState", debugging.show_gpu_state);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowCDROMState", debugging.show_cdrom_state);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowSPUState", debugging.show_spu_state);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowTimersState", debugging.show_timers_state);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowMDECState", debugging.show_mdec_state);
|
|
|
|
|
si.SetBoolValue("Debug", "ShowDMAState", debugging.show_dma_state);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
si.SetBoolValue("TextureReplacements", "EnableVRAMWriteReplacements",
|
|
|
|
|
texture_replacements.enable_vram_write_replacements);
|
|
|
|
|
@ -633,6 +654,33 @@ void Settings::Save(SettingsInterface& si) const
|
|
|
|
|
texture_replacements.dump_vram_write_height_threshold);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Settings::Clear(SettingsInterface& si)
|
|
|
|
|
{
|
|
|
|
|
si.ClearSection("Main");
|
|
|
|
|
si.ClearSection("Console");
|
|
|
|
|
si.ClearSection("CPU");
|
|
|
|
|
si.ClearSection("GPU");
|
|
|
|
|
si.ClearSection("Display");
|
|
|
|
|
si.ClearSection("CDROM");
|
|
|
|
|
si.ClearSection("Audio");
|
|
|
|
|
si.ClearSection("Hacks");
|
|
|
|
|
si.ClearSection("PCDrv");
|
|
|
|
|
si.ClearSection("BIOS");
|
|
|
|
|
|
|
|
|
|
for (u32 i = 0; i < NUM_CONTROLLER_AND_CARD_PORTS; i++)
|
|
|
|
|
si.ClearSection(Controller::GetSettingsSection(i).c_str());
|
|
|
|
|
|
|
|
|
|
si.ClearSection("MemoryCards");
|
|
|
|
|
|
|
|
|
|
// Can't wipe out this section, because input profiles.
|
|
|
|
|
si.DeleteValue("ControllerPorts", "MultitapMode");
|
|
|
|
|
|
|
|
|
|
si.ClearSection("Cheevos");
|
|
|
|
|
si.ClearSection("Logging");
|
|
|
|
|
si.ClearSection("Debug");
|
|
|
|
|
si.ClearSection("TextureReplacements");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Settings::FixIncompatibleSettings(bool display_osd_messages)
|
|
|
|
|
{
|
|
|
|
|
if (g_settings.disable_all_enhancements)
|
|
|
|
|
|