diff --git a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp index 50fe9c3df6..dff293772c 100644 --- a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp +++ b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp @@ -16,19 +16,23 @@ namespace ConfigLoaders { bool IsSettingSaveable(const Config::Location& config_location) { - if (config_location.system == Config::System::DualShockUDPClient) - return true; - - if (config_location.system == Config::System::Logger) - return true; - - if (config_location.system == Config::System::Main) + for (Config::System system : + {Config::System::GFX, Config::System::DualShockUDPClient, Config::System::Logger}) { - if (config_location.section == "NetPlay" || config_location.section == "General") + if (config_location.system == system) return true; } - static constexpr std::array s_setting_saveable = { + if (config_location.system == Config::System::Main) + { + for (const char* section : {"NetPlay", "General", "Display", "Network"}) + { + if (config_location.section == section) + return true; + } + } + + static constexpr std::array s_setting_saveable = { // Main.Core &Config::MAIN_DEFAULT_ISO.location, @@ -43,123 +47,6 @@ bool IsSettingSaveable(const Config::Location& config_location) &Config::MAIN_MEM2_SIZE.location, &Config::MAIN_GFX_BACKEND.location, - // Main.Display - - &Config::MAIN_FULLSCREEN_DISPLAY_RES.location, - &Config::MAIN_FULLSCREEN.location, - &Config::MAIN_RENDER_TO_MAIN.location, - &Config::MAIN_RENDER_WINDOW_AUTOSIZE.location, - &Config::MAIN_KEEP_WINDOW_ON_TOP.location, - &Config::MAIN_DISABLE_SCREENSAVER.location, - - // Main.Network - - &Config::MAIN_NETWORK_SSL_DUMP_READ.location, - &Config::MAIN_NETWORK_SSL_DUMP_WRITE.location, - &Config::MAIN_NETWORK_SSL_VERIFY_CERTIFICATES.location, - &Config::MAIN_NETWORK_SSL_DUMP_ROOT_CA.location, - &Config::MAIN_NETWORK_SSL_DUMP_PEER_CERT.location, - - // Graphics.Hardware - - &Config::GFX_VSYNC.location, - &Config::GFX_ADAPTER.location, - - // Graphics.Settings - - &Config::GFX_WIDESCREEN_HACK.location, - &Config::GFX_ASPECT_RATIO.location, - &Config::GFX_CROP.location, - &Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES.location, - &Config::GFX_SHOW_FPS.location, - &Config::GFX_SHOW_NETPLAY_PING.location, - &Config::GFX_SHOW_NETPLAY_MESSAGES.location, - &Config::GFX_LOG_RENDER_TIME_TO_FILE.location, - &Config::GFX_OVERLAY_STATS.location, - &Config::GFX_OVERLAY_PROJ_STATS.location, - &Config::GFX_DUMP_TEXTURES.location, - &Config::GFX_HIRES_TEXTURES.location, - &Config::GFX_CACHE_HIRES_TEXTURES.location, - &Config::GFX_DUMP_EFB_TARGET.location, - &Config::GFX_DUMP_FRAMES_AS_IMAGES.location, - &Config::GFX_FREE_LOOK.location, - &Config::GFX_FREE_LOOK_CONTROL_TYPE.location, - &Config::GFX_USE_FFV1.location, - &Config::GFX_DUMP_FORMAT.location, - &Config::GFX_DUMP_CODEC.location, - &Config::GFX_DUMP_ENCODER.location, - &Config::GFX_DUMP_PATH.location, - &Config::GFX_BITRATE_KBPS.location, - &Config::GFX_INTERNAL_RESOLUTION_FRAME_DUMPS.location, - &Config::GFX_ENABLE_GPU_TEXTURE_DECODING.location, - &Config::GFX_ENABLE_PIXEL_LIGHTING.location, - &Config::GFX_FAST_DEPTH_CALC.location, - &Config::GFX_MSAA.location, - &Config::GFX_SSAA.location, - &Config::GFX_EFB_SCALE.location, - &Config::GFX_TEXFMT_OVERLAY_ENABLE.location, - &Config::GFX_TEXFMT_OVERLAY_CENTER.location, - &Config::GFX_ENABLE_WIREFRAME.location, - &Config::GFX_DISABLE_FOG.location, - &Config::GFX_BORDERLESS_FULLSCREEN.location, - &Config::GFX_ENABLE_VALIDATION_LAYER.location, - &Config::GFX_BACKEND_MULTITHREADING.location, - &Config::GFX_COMMAND_BUFFER_EXECUTE_INTERVAL.location, - &Config::GFX_SHADER_CACHE.location, - &Config::GFX_WAIT_FOR_SHADERS_BEFORE_STARTING.location, - &Config::GFX_SHADER_COMPILATION_MODE.location, - &Config::GFX_SHADER_COMPILER_THREADS.location, - &Config::GFX_SHADER_PRECOMPILER_THREADS.location, - &Config::GFX_SAVE_TEXTURE_CACHE_TO_STATE.location, - - &Config::GFX_SW_ZCOMPLOC.location, - &Config::GFX_SW_ZFREEZE.location, - &Config::GFX_SW_DUMP_OBJECTS.location, - &Config::GFX_SW_DUMP_TEV_STAGES.location, - &Config::GFX_SW_DUMP_TEV_TEX_FETCHES.location, - &Config::GFX_SW_DRAW_START.location, - &Config::GFX_SW_DRAW_END.location, - - // Graphics.Enhancements - - &Config::GFX_ENHANCE_FORCE_FILTERING.location, - &Config::GFX_ENHANCE_MAX_ANISOTROPY.location, - &Config::GFX_ENHANCE_POST_SHADER.location, - &Config::GFX_ENHANCE_FORCE_TRUE_COLOR.location, - &Config::GFX_ENHANCE_DISABLE_COPY_FILTER.location, - &Config::GFX_ENHANCE_ARBITRARY_MIPMAP_DETECTION.location, - - // Graphics.Stereoscopy - - &Config::GFX_STEREO_MODE.location, - &Config::GFX_STEREO_DEPTH.location, - &Config::GFX_STEREO_CONVERGENCE_PERCENTAGE.location, - &Config::GFX_STEREO_SWAP_EYES.location, - &Config::GFX_STEREO_CONVERGENCE.location, - &Config::GFX_STEREO_EFB_MONO_DEPTH.location, - &Config::GFX_STEREO_DEPTH_PERCENTAGE.location, - - // Graphics.Hacks - - &Config::GFX_HACK_EFB_ACCESS_ENABLE.location, - &Config::GFX_HACK_EFB_DEFER_INVALIDATION.location, - &Config::GFX_HACK_EFB_ACCESS_TILE_SIZE.location, - &Config::GFX_HACK_BBOX_ENABLE.location, - &Config::GFX_HACK_FORCE_PROGRESSIVE.location, - &Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM.location, - &Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM.location, - &Config::GFX_HACK_DISABLE_COPY_TO_VRAM.location, - &Config::GFX_HACK_DEFER_EFB_COPIES.location, - &Config::GFX_HACK_IMMEDIATE_XFB.location, - &Config::GFX_HACK_SKIP_DUPLICATE_XFBS.location, - &Config::GFX_HACK_COPY_EFB_SCALED.location, - &Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES.location, - &Config::GFX_HACK_VERTEX_ROUDING.location, - - // Graphics.GameSpecific - - &Config::GFX_PERF_QUERIES_ENABLE.location, - // UI.General &Config::MAIN_USE_DISCORD_PRESENCE.location,