Config: Remove redundant GS setting macros

Not needed without WX.
This commit is contained in:
Stenzek 2024-05-15 08:25:03 +10:00 committed by Connor McLaughlin
parent 5d50cd562f
commit 81203d9a15
1 changed files with 113 additions and 133 deletions

View File

@ -813,159 +813,139 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap)
SettingsWrapEntryEx(Crop[2], "CropRight"); SettingsWrapEntryEx(Crop[2], "CropRight");
SettingsWrapEntryEx(Crop[3], "CropBottom"); SettingsWrapEntryEx(Crop[3], "CropBottom");
#define GSSettingInt(var) SettingsWrapBitfield(var)
#define GSSettingIntEx(var, name) SettingsWrapBitfieldEx(var, name)
#define GSSettingBool(var) SettingsWrapBitBool(var)
#define GSSettingBoolEx(var, name) SettingsWrapBitBoolEx(var, name)
#define GSSettingFloat(var) SettingsWrapEntry(var)
#define GSSettingFloatEx(var, name) SettingsWrapEntryEx(var, name)
#define GSSettingIntEnumEx(var, name) SettingsWrapIntEnumEx(var, name)
#define GSSettingString(var) SettingsWrapEntry(var)
#define GSSettingStringEx(var, name) SettingsWrapEntryEx(var, name)
// Unfortunately, because code in the GS still reads the setting by key instead of // Unfortunately, because code in the GS still reads the setting by key instead of
// using these variables, we need to use the old names. Maybe post 2.0 we can change this. // using these variables, we need to use the old names. Maybe post 2.0 we can change this.
GSSettingBoolEx(PCRTCAntiBlur, "pcrtc_antiblur"); SettingsWrapBitBoolEx(PCRTCAntiBlur, "pcrtc_antiblur");
GSSettingBoolEx(DisableInterlaceOffset, "disable_interlace_offset"); SettingsWrapBitBoolEx(DisableInterlaceOffset, "disable_interlace_offset");
GSSettingBoolEx(PCRTCOffsets, "pcrtc_offsets"); SettingsWrapBitBoolEx(PCRTCOffsets, "pcrtc_offsets");
GSSettingBoolEx(PCRTCOverscan, "pcrtc_overscan"); SettingsWrapBitBoolEx(PCRTCOverscan, "pcrtc_overscan");
GSSettingBool(IntegerScaling); SettingsWrapBitBool(IntegerScaling);
GSSettingBool(UseDebugDevice); SettingsWrapBitBool(UseDebugDevice);
GSSettingBool(UseBlitSwapChain); SettingsWrapBitBool(UseBlitSwapChain);
GSSettingBool(DisableShaderCache); SettingsWrapBitBool(DisableShaderCache);
GSSettingBool(DisableFramebufferFetch); SettingsWrapBitBool(DisableFramebufferFetch);
GSSettingBool(DisableVertexShaderExpand); SettingsWrapBitBool(DisableVertexShaderExpand);
GSSettingBool(DisableThreadedPresentation); SettingsWrapBitBool(DisableThreadedPresentation);
GSSettingBool(SkipDuplicateFrames); SettingsWrapBitBool(SkipDuplicateFrames);
GSSettingBool(OsdShowMessages); SettingsWrapBitBool(OsdShowMessages);
GSSettingBool(OsdShowSpeed); SettingsWrapBitBool(OsdShowSpeed);
GSSettingBool(OsdShowFPS); SettingsWrapBitBool(OsdShowFPS);
GSSettingBool(OsdShowCPU); SettingsWrapBitBool(OsdShowCPU);
GSSettingBool(OsdShowGPU); SettingsWrapBitBool(OsdShowGPU);
GSSettingBool(OsdShowResolution); SettingsWrapBitBool(OsdShowResolution);
GSSettingBool(OsdShowGSStats); SettingsWrapBitBool(OsdShowGSStats);
GSSettingBool(OsdShowIndicators); SettingsWrapBitBool(OsdShowIndicators);
GSSettingBool(OsdShowSettings); SettingsWrapBitBool(OsdShowSettings);
GSSettingBool(OsdShowInputs); SettingsWrapBitBool(OsdShowInputs);
GSSettingBool(OsdShowFrameTimes); SettingsWrapBitBool(OsdShowFrameTimes);
GSSettingBool(HWSpinGPUForReadbacks); SettingsWrapBitBool(HWSpinGPUForReadbacks);
GSSettingBool(HWSpinCPUForReadbacks); SettingsWrapBitBool(HWSpinCPUForReadbacks);
GSSettingBoolEx(GPUPaletteConversion, "paltex"); SettingsWrapBitBoolEx(GPUPaletteConversion, "paltex");
GSSettingBoolEx(AutoFlushSW, "autoflush_sw"); SettingsWrapBitBoolEx(AutoFlushSW, "autoflush_sw");
GSSettingBoolEx(PreloadFrameWithGSData, "preload_frame_with_gs_data"); SettingsWrapBitBoolEx(PreloadFrameWithGSData, "preload_frame_with_gs_data");
GSSettingBoolEx(Mipmap, "mipmap"); SettingsWrapBitBoolEx(Mipmap, "mipmap");
GSSettingBoolEx(ManualUserHacks, "UserHacks"); SettingsWrapBitBoolEx(ManualUserHacks, "UserHacks");
GSSettingBoolEx(UserHacks_AlignSpriteX, "UserHacks_align_sprite_X"); SettingsWrapBitBoolEx(UserHacks_AlignSpriteX, "UserHacks_align_sprite_X");
GSSettingIntEnumEx(UserHacks_AutoFlush, "UserHacks_AutoFlushLevel"); SettingsWrapIntEnumEx(UserHacks_AutoFlush, "UserHacks_AutoFlushLevel");
GSSettingBoolEx(UserHacks_CPUFBConversion, "UserHacks_CPU_FB_Conversion"); SettingsWrapBitBoolEx(UserHacks_CPUFBConversion, "UserHacks_CPU_FB_Conversion");
GSSettingBoolEx(UserHacks_ReadTCOnClose, "UserHacks_ReadTCOnClose"); SettingsWrapBitBoolEx(UserHacks_ReadTCOnClose, "UserHacks_ReadTCOnClose");
GSSettingBoolEx(UserHacks_DisableDepthSupport, "UserHacks_DisableDepthSupport"); SettingsWrapBitBoolEx(UserHacks_DisableDepthSupport, "UserHacks_DisableDepthSupport");
GSSettingBoolEx(UserHacks_DisablePartialInvalidation, "UserHacks_DisablePartialInvalidation"); SettingsWrapBitBoolEx(UserHacks_DisablePartialInvalidation, "UserHacks_DisablePartialInvalidation");
GSSettingBoolEx(UserHacks_DisableSafeFeatures, "UserHacks_Disable_Safe_Features"); SettingsWrapBitBoolEx(UserHacks_DisableSafeFeatures, "UserHacks_Disable_Safe_Features");
GSSettingBoolEx(UserHacks_DisableRenderFixes, "UserHacks_DisableRenderFixes"); SettingsWrapBitBoolEx(UserHacks_DisableRenderFixes, "UserHacks_DisableRenderFixes");
GSSettingBoolEx(UserHacks_MergePPSprite, "UserHacks_merge_pp_sprite"); SettingsWrapBitBoolEx(UserHacks_MergePPSprite, "UserHacks_merge_pp_sprite");
GSSettingBoolEx(UserHacks_WildHack, "UserHacks_WildHack"); SettingsWrapBitBoolEx(UserHacks_WildHack, "UserHacks_WildHack");
GSSettingIntEnumEx(UserHacks_BilinearHack, "UserHacks_BilinearHack"); SettingsWrapIntEnumEx(UserHacks_BilinearHack, "UserHacks_BilinearHack");
GSSettingBoolEx(UserHacks_NativePaletteDraw, "UserHacks_NativePaletteDraw"); SettingsWrapBitBoolEx(UserHacks_NativePaletteDraw, "UserHacks_NativePaletteDraw");
GSSettingIntEnumEx(UserHacks_TextureInsideRt, "UserHacks_TextureInsideRt"); SettingsWrapIntEnumEx(UserHacks_TextureInsideRt, "UserHacks_TextureInsideRt");
GSSettingBoolEx(UserHacks_EstimateTextureRegion, "UserHacks_EstimateTextureRegion"); SettingsWrapBitBoolEx(UserHacks_EstimateTextureRegion, "UserHacks_EstimateTextureRegion");
GSSettingBoolEx(FXAA, "fxaa"); SettingsWrapBitBoolEx(FXAA, "fxaa");
GSSettingBool(ShadeBoost); SettingsWrapBitBool(ShadeBoost);
GSSettingBoolEx(DumpGSData, "dump"); SettingsWrapBitBoolEx(DumpGSData, "dump");
GSSettingBoolEx(SaveRT, "save"); SettingsWrapBitBoolEx(SaveRT, "save");
GSSettingBoolEx(SaveFrame, "savef"); SettingsWrapBitBoolEx(SaveFrame, "savef");
GSSettingBoolEx(SaveTexture, "savet"); SettingsWrapBitBoolEx(SaveTexture, "savet");
GSSettingBoolEx(SaveDepth, "savez"); SettingsWrapBitBoolEx(SaveDepth, "savez");
GSSettingBool(DumpReplaceableTextures); SettingsWrapBitBool(DumpReplaceableTextures);
GSSettingBool(DumpReplaceableMipmaps); SettingsWrapBitBool(DumpReplaceableMipmaps);
GSSettingBool(DumpTexturesWithFMVActive); SettingsWrapBitBool(DumpTexturesWithFMVActive);
GSSettingBool(DumpDirectTextures); SettingsWrapBitBool(DumpDirectTextures);
GSSettingBool(DumpPaletteTextures); SettingsWrapBitBool(DumpPaletteTextures);
GSSettingBool(LoadTextureReplacements); SettingsWrapBitBool(LoadTextureReplacements);
GSSettingBool(LoadTextureReplacementsAsync); SettingsWrapBitBool(LoadTextureReplacementsAsync);
GSSettingBool(PrecacheTextureReplacements); SettingsWrapBitBool(PrecacheTextureReplacements);
GSSettingBool(EnableVideoCapture); SettingsWrapBitBool(EnableVideoCapture);
GSSettingBool(EnableVideoCaptureParameters); SettingsWrapBitBool(EnableVideoCaptureParameters);
GSSettingBool(VideoCaptureAutoResolution); SettingsWrapBitBool(VideoCaptureAutoResolution);
GSSettingBool(EnableAudioCapture); SettingsWrapBitBool(EnableAudioCapture);
GSSettingBool(EnableAudioCaptureParameters); SettingsWrapBitBool(EnableAudioCaptureParameters);
GSSettingIntEnumEx(LinearPresent, "linear_present_mode"); SettingsWrapIntEnumEx(LinearPresent, "linear_present_mode");
GSSettingIntEnumEx(InterlaceMode, "deinterlace_mode"); SettingsWrapIntEnumEx(InterlaceMode, "deinterlace_mode");
GSSettingFloat(OsdScale); SettingsWrapEntry(OsdScale);
GSSettingIntEnumEx(Renderer, "Renderer"); SettingsWrapIntEnumEx(Renderer, "Renderer");
GSSettingFloatEx(UpscaleMultiplier, "upscale_multiplier"); SettingsWrapEntryEx(UpscaleMultiplier, "upscale_multiplier");
// ~51x would the upper bound here for 32768x32768 textures, but you'll run out VRAM long before then. // ~51x would the upper bound here for 32768x32768 textures, but you'll run out VRAM long before then.
UpscaleMultiplier = std::clamp(UpscaleMultiplier, 0.5f, 50.0f); UpscaleMultiplier = std::clamp(UpscaleMultiplier, 0.5f, 50.0f);
GSSettingIntEnumEx(HWMipmap, "mipmap_hw"); SettingsWrapIntEnumEx(HWMipmap, "mipmap_hw");
GSSettingIntEnumEx(AccurateBlendingUnit, "accurate_blending_unit"); SettingsWrapIntEnumEx(AccurateBlendingUnit, "accurate_blending_unit");
GSSettingIntEnumEx(TextureFiltering, "filter"); SettingsWrapIntEnumEx(TextureFiltering, "filter");
GSSettingIntEnumEx(TexturePreloading, "texture_preloading"); SettingsWrapIntEnumEx(TexturePreloading, "texture_preloading");
GSSettingIntEnumEx(GSDumpCompression, "GSDumpCompression"); SettingsWrapIntEnumEx(GSDumpCompression, "GSDumpCompression");
GSSettingIntEnumEx(HWDownloadMode, "HWDownloadMode"); SettingsWrapIntEnumEx(HWDownloadMode, "HWDownloadMode");
GSSettingIntEnumEx(CASMode, "CASMode"); SettingsWrapIntEnumEx(CASMode, "CASMode");
GSSettingIntEx(CAS_Sharpness, "CASSharpness"); SettingsWrapBitfieldEx(CAS_Sharpness, "CASSharpness");
GSSettingIntEx(Dithering, "dithering_ps2"); SettingsWrapBitfieldEx(Dithering, "dithering_ps2");
GSSettingIntEx(MaxAnisotropy, "MaxAnisotropy"); SettingsWrapBitfieldEx(MaxAnisotropy, "MaxAnisotropy");
GSSettingIntEx(SWExtraThreads, "extrathreads"); SettingsWrapBitfieldEx(SWExtraThreads, "extrathreads");
GSSettingIntEx(SWExtraThreadsHeight, "extrathreads_height"); SettingsWrapBitfieldEx(SWExtraThreadsHeight, "extrathreads_height");
GSSettingIntEx(TVShader, "TVShader"); SettingsWrapBitfieldEx(TVShader, "TVShader");
GSSettingIntEx(SkipDrawStart, "UserHacks_SkipDraw_Start"); SettingsWrapBitfieldEx(SkipDrawStart, "UserHacks_SkipDraw_Start");
GSSettingIntEx(SkipDrawEnd, "UserHacks_SkipDraw_End"); SettingsWrapBitfieldEx(SkipDrawEnd, "UserHacks_SkipDraw_End");
SkipDrawEnd = std::max(SkipDrawStart, SkipDrawEnd); SkipDrawEnd = std::max(SkipDrawStart, SkipDrawEnd);
GSSettingIntEnumEx(UserHacks_HalfPixelOffset, "UserHacks_HalfPixelOffset"); SettingsWrapIntEnumEx(UserHacks_HalfPixelOffset, "UserHacks_HalfPixelOffset");
GSSettingIntEx(UserHacks_RoundSprite, "UserHacks_round_sprite_offset"); SettingsWrapBitfieldEx(UserHacks_RoundSprite, "UserHacks_round_sprite_offset");
GSSettingIntEx(UserHacks_TCOffsetX, "UserHacks_TCOffsetX"); SettingsWrapBitfieldEx(UserHacks_TCOffsetX, "UserHacks_TCOffsetX");
GSSettingIntEx(UserHacks_TCOffsetY, "UserHacks_TCOffsetY"); SettingsWrapBitfieldEx(UserHacks_TCOffsetY, "UserHacks_TCOffsetY");
GSSettingIntEx(UserHacks_CPUSpriteRenderBW, "UserHacks_CPUSpriteRenderBW"); SettingsWrapBitfieldEx(UserHacks_CPUSpriteRenderBW, "UserHacks_CPUSpriteRenderBW");
GSSettingIntEx(UserHacks_CPUSpriteRenderLevel, "UserHacks_CPUSpriteRenderLevel"); SettingsWrapBitfieldEx(UserHacks_CPUSpriteRenderLevel, "UserHacks_CPUSpriteRenderLevel");
GSSettingIntEx(UserHacks_CPUCLUTRender, "UserHacks_CPUCLUTRender"); SettingsWrapBitfieldEx(UserHacks_CPUCLUTRender, "UserHacks_CPUCLUTRender");
GSSettingIntEnumEx(UserHacks_GPUTargetCLUTMode, "UserHacks_GPUTargetCLUTMode"); SettingsWrapIntEnumEx(UserHacks_GPUTargetCLUTMode, "UserHacks_GPUTargetCLUTMode");
GSSettingIntEnumEx(TriFilter, "TriFilter"); SettingsWrapIntEnumEx(TriFilter, "TriFilter");
GSSettingIntEx(OverrideTextureBarriers, "OverrideTextureBarriers"); SettingsWrapBitfieldEx(OverrideTextureBarriers, "OverrideTextureBarriers");
GSSettingInt(ShadeBoost_Brightness); SettingsWrapBitfield(ShadeBoost_Brightness);
GSSettingInt(ShadeBoost_Contrast); SettingsWrapBitfield(ShadeBoost_Contrast);
GSSettingInt(ShadeBoost_Saturation); SettingsWrapBitfield(ShadeBoost_Saturation);
GSSettingInt(ExclusiveFullscreenControl); SettingsWrapBitfield(ExclusiveFullscreenControl);
GSSettingIntEx(PNGCompressionLevel, "png_compression_level"); SettingsWrapBitfieldEx(PNGCompressionLevel, "png_compression_level");
GSSettingIntEx(SaveN, "saven"); SettingsWrapBitfieldEx(SaveN, "saven");
GSSettingIntEx(SaveL, "savel"); SettingsWrapBitfieldEx(SaveL, "savel");
GSSettingStringEx(CaptureContainer, "CaptureContainer"); SettingsWrapEntryEx(CaptureContainer, "CaptureContainer");
GSSettingStringEx(VideoCaptureCodec, "VideoCaptureCodec"); SettingsWrapEntryEx(VideoCaptureCodec, "VideoCaptureCodec");
GSSettingStringEx(VideoCaptureParameters, "VideoCaptureParameters"); SettingsWrapEntryEx(VideoCaptureParameters, "VideoCaptureParameters");
GSSettingStringEx(AudioCaptureCodec, "AudioCaptureCodec"); SettingsWrapEntryEx(AudioCaptureCodec, "AudioCaptureCodec");
GSSettingStringEx(AudioCaptureParameters, "AudioCaptureParameters"); SettingsWrapEntryEx(AudioCaptureParameters, "AudioCaptureParameters");
GSSettingIntEx(VideoCaptureBitrate, "VideoCaptureBitrate"); SettingsWrapBitfieldEx(VideoCaptureBitrate, "VideoCaptureBitrate");
GSSettingIntEx(VideoCaptureWidth, "VideoCaptureWidth"); SettingsWrapBitfieldEx(VideoCaptureWidth, "VideoCaptureWidth");
GSSettingIntEx(VideoCaptureHeight, "VideoCaptureHeight"); SettingsWrapBitfieldEx(VideoCaptureHeight, "VideoCaptureHeight");
GSSettingIntEx(AudioCaptureBitrate, "AudioCaptureBitrate"); SettingsWrapBitfieldEx(AudioCaptureBitrate, "AudioCaptureBitrate");
GSSettingString(Adapter); SettingsWrapEntry(Adapter);
GSSettingString(HWDumpDirectory); SettingsWrapEntry(HWDumpDirectory);
if (!HWDumpDirectory.empty() && !Path::IsAbsolute(HWDumpDirectory)) if (!HWDumpDirectory.empty() && !Path::IsAbsolute(HWDumpDirectory))
HWDumpDirectory = Path::Combine(EmuFolders::DataRoot, HWDumpDirectory); HWDumpDirectory = Path::Combine(EmuFolders::DataRoot, HWDumpDirectory);
GSSettingString(SWDumpDirectory); SettingsWrapEntry(SWDumpDirectory);
if (!SWDumpDirectory.empty() && !Path::IsAbsolute(SWDumpDirectory)) if (!SWDumpDirectory.empty() && !Path::IsAbsolute(SWDumpDirectory))
SWDumpDirectory = Path::Combine(EmuFolders::DataRoot, SWDumpDirectory); SWDumpDirectory = Path::Combine(EmuFolders::DataRoot, SWDumpDirectory);
#undef GSSettingInt
#undef GSSettingIntEx
#undef GSSettingBool
#undef GSSettingBoolEx
#undef GSSettingFloat
#undef GSSettingEnumEx
#undef GSSettingIntEnumEx
#undef GSSettingString
#undef GSSettingStringEx
// Sanity check: don't dump a bunch of crap in the current working directory. // Sanity check: don't dump a bunch of crap in the current working directory.
if (DumpGSData && (HWDumpDirectory.empty() || SWDumpDirectory.empty())) if (DumpGSData && (HWDumpDirectory.empty() || SWDumpDirectory.empty()))
{ {