2024-02-12 10:01:29 +00:00
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
2024-07-30 11:42:36 +00:00
// SPDX-License-Identifier: GPL-3.0+
2021-12-13 12:12:54 +00:00
# include "GraphicsSettingsWidget.h"
# include "QtUtils.h"
# include "SettingWidgetBinder.h"
2023-10-14 08:45:09 +00:00
# include "SettingsWindow.h"
2021-12-13 12:12:54 +00:00
# include <QtWidgets/QMessageBox>
2023-05-13 04:30:41 +00:00
# include "pcsx2/Host.h"
2021-12-13 12:12:54 +00:00
# include "pcsx2/GS/GS.h"
2022-12-18 13:05:00 +00:00
# include "pcsx2/GS/GSCapture.h"
2021-12-13 12:12:54 +00:00
# include "pcsx2/GS/GSUtil.h"
struct RendererInfo
{
const char * name ;
GSRendererType type ;
} ;
static constexpr RendererInfo s_renderer_info [ ] = {
2022-12-25 08:20:28 +00:00
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " Automatic (Default) " ) , GSRendererType : : Auto } ,
2021-12-13 12:12:54 +00:00
# ifdef _WIN32
2023-03-18 21:14:55 +00:00
//: Graphics backend/engine type. Leave as-is.
2022-12-25 08:20:28 +00:00
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " Direct3D 11 " ) , GSRendererType : : DX11 } ,
2023-03-18 21:14:55 +00:00
//: Graphics backend/engine type. Leave as-is.
2022-12-25 08:20:28 +00:00
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " Direct3D 12 " ) , GSRendererType : : DX12 } ,
2021-12-13 12:12:54 +00:00
# endif
2022-04-03 04:49:49 +00:00
# ifdef ENABLE_OPENGL
2023-03-18 21:14:55 +00:00
//: Graphics backend/engine type. Leave as-is.
2022-12-25 08:20:28 +00:00
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " OpenGL " ) , GSRendererType : : OGL } ,
2022-04-03 04:49:49 +00:00
# endif
# ifdef ENABLE_VULKAN
2023-03-18 21:14:55 +00:00
//: Graphics backend/engine type. Leave as-is.
2022-12-25 08:20:28 +00:00
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " Vulkan " ) , GSRendererType : : VK } ,
2022-04-03 04:49:49 +00:00
# endif
# ifdef __APPLE__
2023-03-18 21:14:55 +00:00
//: Graphics backend/engine type. Leave as-is.
2022-12-25 08:20:28 +00:00
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " Metal " ) , GSRendererType : : Metal } ,
2022-04-03 04:49:49 +00:00
# endif
2023-03-18 21:14:55 +00:00
//: Graphics backend/engine type (refers to emulating the GS in software, on the CPU). Translate accordingly.
2022-12-25 08:20:28 +00:00
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " Software " ) , GSRendererType : : SW } ,
2023-03-18 21:14:55 +00:00
//: Null here means that this is a graphics backend that will show nothing.
2022-12-25 08:20:28 +00:00
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " Null " ) , GSRendererType : : Null } ,
2021-12-13 12:12:54 +00:00
} ;
static const char * s_anisotropic_filtering_entries [ ] = { QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " Off (Default) " ) ,
2022-02-15 14:29:18 +00:00
QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 2x " ) , QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 4x " ) ,
QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 8x " ) , QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 16x " ) , nullptr } ;
2022-03-24 00:58:29 +00:00
static const char * s_anisotropic_filtering_values [ ] = { " 0 " , " 2 " , " 4 " , " 8 " , " 16 " , nullptr } ;
2021-12-13 12:12:54 +00:00
2022-11-11 08:24:08 +00:00
static constexpr int DEFAULT_INTERLACE_MODE = 0 ;
2022-05-31 12:58:21 +00:00
static constexpr int DEFAULT_TV_SHADER_MODE = 0 ;
2022-11-20 14:20:40 +00:00
static constexpr int DEFAULT_CAS_SHARPNESS = 50 ;
2021-12-13 12:12:54 +00:00
2023-10-14 08:45:09 +00:00
GraphicsSettingsWidget : : GraphicsSettingsWidget ( SettingsWindow * dialog , QWidget * parent )
2021-12-13 12:12:54 +00:00
: QWidget ( parent )
2022-02-15 14:29:18 +00:00
, m_dialog ( dialog )
2021-12-13 12:12:54 +00:00
{
2022-02-15 14:29:18 +00:00
SettingsInterface * sif = dialog - > getSettingsInterface ( ) ;
2021-12-13 12:12:54 +00:00
m_ui . setupUi ( this ) ;
2023-03-12 13:44:53 +00:00
# ifndef PCSX2_DEVBUILD
if ( ! m_dialog - > isPerGameSettings ( ) )
{
// We removed hardware fixes from global settings, but people in the past did set this stuff globally.
// So, just reset it all. We can remove this code at some point in the future.
resetManualHardwareFixes ( ) ;
}
# endif
2021-12-13 12:12:54 +00:00
//////////////////////////////////////////////////////////////////////////
// Global Settings
//////////////////////////////////////////////////////////////////////////
2024-06-12 09:56:12 +00:00
SettingWidgetBinder : : BindWidgetToStringSetting ( sif , m_ui . adapterDropdown , " EmuCore/GS " , " Adapter " ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . enableHWFixes , " EmuCore/GS " , " UserHacks " , false ) ;
2022-09-18 01:46:27 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . spinGPUDuringReadbacks , " EmuCore/GS " , " HWSpinGPUForReadbacks " , false ) ;
2022-09-28 06:54:33 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . spinCPUDuringReadbacks , " EmuCore/GS " , " HWSpinCPUForReadbacks " , false ) ;
2021-12-13 12:12:54 +00:00
//////////////////////////////////////////////////////////////////////////
// Game Display Settings
//////////////////////////////////////////////////////////////////////////
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToEnumSetting (
2022-04-11 13:00:18 +00:00
sif , m_ui . aspectRatio , " EmuCore/GS " , " AspectRatio " , Pcsx2Config : : GSOptions : : AspectRatioNames , AspectRatioType : : RAuto4_3_3_2 ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToEnumSetting ( sif , m_ui . fmvAspectRatio , " EmuCore/GS " , " FMVAspectRatioSwitch " ,
Pcsx2Config : : GSOptions : : FMVAspectRatioSwitchNames , FMVAspectRatioSwitchType : : Off ) ;
2022-11-11 21:29:02 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . interlacing , " EmuCore/GS " , " deinterlace_mode " , DEFAULT_INTERLACE_MODE ) ;
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . bilinearFiltering , " EmuCore/GS " , " linear_present_mode " , static_cast < int > ( GSPostBilinearMode : : BilinearSmooth ) ) ;
2022-11-23 13:20:49 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . widescreenPatches , " EmuCore " , " EnableWideScreenPatches " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . noInterlacingPatches , " EmuCore " , " EnableNoInterlacingPatches " , false ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . integerScaling , " EmuCore/GS " , " IntegerScaling " , false ) ;
2022-04-10 14:30:55 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . PCRTCOffsets , " EmuCore/GS " , " pcrtc_offsets " , false ) ;
2022-06-05 17:03:13 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . PCRTCOverscan , " EmuCore/GS " , " pcrtc_overscan " , false ) ;
2022-06-14 22:54:08 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . PCRTCAntiBlur , " EmuCore/GS " , " pcrtc_antiblur " , true ) ;
2022-05-20 17:17:35 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . DisableInterlaceOffset , " EmuCore/GS " , " disable_interlace_offset " , false ) ;
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . screenshotSize , " EmuCore/GS " , " ScreenshotSize " , static_cast < int > ( GSScreenshotSize : : WindowResolution ) ) ;
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . screenshotFormat , " EmuCore/GS " , " ScreenshotFormat " , static_cast < int > ( GSScreenshotFormat : : PNG ) ) ;
2022-12-10 09:11:08 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . screenshotQuality , " EmuCore/GS " , " ScreenshotQuality " , 50 ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToFloatSetting ( sif , m_ui . stretchY , " EmuCore/GS " , " StretchY " , 100.0f ) ;
2022-06-29 12:45:01 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . cropLeft , " EmuCore/GS " , " CropLeft " , 0 ) ;
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . cropTop , " EmuCore/GS " , " CropTop " , 0 ) ;
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . cropRight , " EmuCore/GS " , " CropRight " , 0 ) ;
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . cropBottom , " EmuCore/GS " , " CropBottom " , 0 ) ;
2021-12-13 12:12:54 +00:00
2023-01-19 14:01:54 +00:00
connect (
m_ui . fullscreenModes , QOverload < int > : : of ( & QComboBox : : currentIndexChanged ) , this , & GraphicsSettingsWidget : : onFullscreenModeChanged ) ;
2021-12-13 12:12:54 +00:00
//////////////////////////////////////////////////////////////////////////
// OSD Settings
//////////////////////////////////////////////////////////////////////////
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToFloatSetting ( sif , m_ui . osdScale , " EmuCore/GS " , " OsdScale " , 100.0f ) ;
2024-07-29 05:43:28 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . osdMessagesPos , " EmuCore/GS " , " OsdMessagesPos " , static_cast < int > ( OsdOverlayPos : : TopLeft ) ) ;
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . osdPerformancePos , " EmuCore/GS " , " OsdPerformancePos " , static_cast < int > ( OsdOverlayPos : : TopRight ) ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowSpeed , " EmuCore/GS " , " OsdShowSpeed " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowFPS , " EmuCore/GS " , " OsdShowFPS " , false ) ;
2024-09-14 13:40:48 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowVPS , " EmuCore/GS " , " OsdShowVPS " , false ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowCPU , " EmuCore/GS " , " OsdShowCPU " , false ) ;
2022-03-11 12:05:38 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowGPU , " EmuCore/GS " , " OsdShowGPU " , false ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowResolution , " EmuCore/GS " , " OsdShowResolution " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowGSStats , " EmuCore/GS " , " OsdShowGSStats " , false ) ;
2022-02-23 11:52:18 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowIndicators , " EmuCore/GS " , " OsdShowIndicators " , true ) ;
2022-09-17 12:45:03 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowSettings , " EmuCore/GS " , " OsdShowSettings " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowInputs , " EmuCore/GS " , " OsdShowInputs " , false ) ;
2022-11-30 14:25:16 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowFrameTimes , " EmuCore/GS " , " OsdShowFrameTimes " , false ) ;
2024-07-19 14:07:36 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowVersion , " EmuCore/GS " , " OsdShowVersion " , false ) ;
2024-07-20 02:58:31 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowHardwareInfo , " EmuCore/GS " , " OsdShowHardwareInfo " , false ) ;
2024-08-02 13:51:02 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowVideoCapture , " EmuCore/GS " , " OsdShowVideoCapture " , true ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . osdShowInputRec , " EmuCore/GS " , " OsdShowInputRec " , true ) ;
2022-11-23 13:20:49 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . warnAboutUnsafeSettings , " EmuCore " , " WarnAboutUnsafeSettings " , true ) ;
2022-03-26 18:16:25 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . fxaa , " EmuCore/GS " , " fxaa " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . shadeBoost , " EmuCore/GS " , " ShadeBoost " , false ) ;
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . shadeBoostBrightness , " EmuCore/GS " , " ShadeBoost_Brightness " , false ) ;
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . shadeBoostContrast , " EmuCore/GS " , " ShadeBoost_Contrast " , false ) ;
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . shadeBoostSaturation , " EmuCore/GS " , " ShadeBoost_Saturation " , false ) ;
2022-05-31 12:58:21 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . tvShader , " EmuCore/GS " , " TVShader " , DEFAULT_TV_SHADER_MODE ) ;
2022-11-20 14:20:40 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . casMode , " EmuCore/GS " , " CASMode " , static_cast < int > ( GSCASMode : : Disabled ) ) ;
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . casSharpness , " EmuCore/GS " , " CASSharpness " , DEFAULT_CAS_SHARPNESS ) ;
2022-03-26 18:16:25 +00:00
2024-04-12 12:22:58 +00:00
connect ( m_ui . shadeBoost , & QCheckBox : : checkStateChanged , this , & GraphicsSettingsWidget : : onShadeBoostChanged ) ;
2022-03-26 18:16:25 +00:00
onShadeBoostChanged ( ) ;
2024-07-29 05:43:28 +00:00
connect ( m_ui . osdMessagesPos , & QComboBox : : currentIndexChanged , this , & GraphicsSettingsWidget : : onMessagesPosChanged ) ;
connect ( m_ui . osdPerformancePos , & QComboBox : : currentIndexChanged , this , & GraphicsSettingsWidget : : onPerformancePosChanged ) ;
onMessagesPosChanged ( ) ;
onPerformancePosChanged ( ) ;
2021-12-13 12:12:54 +00:00
//////////////////////////////////////////////////////////////////////////
// HW Settings
//////////////////////////////////////////////////////////////////////////
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . textureFiltering , " EmuCore/GS " , " filter " , static_cast < int > ( BiFiltering : : PS2 ) ) ;
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . trilinearFiltering , " EmuCore/GS " , " TriFilter " , static_cast < int > ( TriFiltering : : Automatic ) , - 1 ) ;
SettingWidgetBinder : : BindWidgetToEnumSetting ( sif , m_ui . anisotropicFiltering , " EmuCore/GS " , " MaxAnisotropy " ,
s_anisotropic_filtering_entries , s_anisotropic_filtering_values , " 0 " ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . dithering , " EmuCore/GS " , " dithering_ps2 " , 2 ) ;
2024-05-16 13:56:12 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . mipmapping , " EmuCore/GS " , " hw_mipmap " , true ) ;
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . blending , " EmuCore/GS " , " accurate_blending_unit " , static_cast < int > ( AccBlendLevel : : Basic ) ) ;
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . texturePreloading , " EmuCore/GS " , " texture_preloading " , static_cast < int > ( TexturePreloadingLevel : : Off ) ) ;
2024-06-30 14:21:03 +00:00
connect ( m_ui . upscaleMultiplier , QOverload < int > : : of ( & QComboBox : : currentIndexChanged ) , this ,
& GraphicsSettingsWidget : : onUpscaleMultiplierChanged ) ;
2023-01-19 14:01:54 +00:00
connect ( m_ui . trilinearFiltering , QOverload < int > : : of ( & QComboBox : : currentIndexChanged ) , this ,
& GraphicsSettingsWidget : : onTrilinearFilteringChanged ) ;
2022-03-26 04:06:40 +00:00
onTrilinearFilteringChanged ( ) ;
2022-03-24 00:58:29 +00:00
2021-12-13 12:12:54 +00:00
//////////////////////////////////////////////////////////////////////////
// HW Renderer Fixes
//////////////////////////////////////////////////////////////////////////
2022-06-02 15:00:39 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . cpuSpriteRenderBW , " EmuCore/GS " , " UserHacks_CPUSpriteRenderBW " , 0 ) ;
2023-03-19 12:24:29 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . cpuSpriteRenderLevel , " EmuCore/GS " , " UserHacks_CPUSpriteRenderLevel " , 0 ) ;
2022-10-22 10:43:29 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . cpuCLUTRender , " EmuCore/GS " , " UserHacks_CPUCLUTRender " , 0 ) ;
2023-01-02 13:14:10 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . gpuTargetCLUTMode , " EmuCore/GS " , " UserHacks_GPUTargetCLUTMode " , 0 ) ;
2022-03-19 00:08:30 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . skipDrawStart , " EmuCore/GS " , " UserHacks_SkipDraw_Start " , 0 ) ;
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . skipDrawEnd , " EmuCore/GS " , " UserHacks_SkipDraw_End " , 0 ) ;
2023-04-23 06:50:17 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . hwAutoFlush , " EmuCore/GS " , " UserHacks_AutoFlushLevel " , 0 ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . frameBufferConversion , " EmuCore/GS " , " UserHacks_CPU_FB_Conversion " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . disableDepthEmulation , " EmuCore/GS " , " UserHacks_DisableDepthSupport " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . disableSafeFeatures , " EmuCore/GS " , " UserHacks_Disable_Safe_Features " , false ) ;
2023-05-11 10:41:26 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . disableRenderFixes , " EmuCore/GS " , " UserHacks_DisableRenderFixes " , false ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . preloadFrameData , " EmuCore/GS " , " preload_frame_with_gs_data " , false ) ;
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting (
sif , m_ui . disablePartialInvalidation , " EmuCore/GS " , " UserHacks_DisablePartialInvalidation " , false ) ;
2023-02-26 12:15:48 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . textureInsideRt , " EmuCore/GS " , " UserHacks_TextureInsideRt " , static_cast < int > ( GSTextureInRtMode : : Disabled ) ) ;
2023-02-23 11:00:48 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . readTCOnClose , " EmuCore/GS " , " UserHacks_ReadTCOnClose " , false ) ;
2023-02-15 11:51:34 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . estimateTextureRegion , " EmuCore/GS " , " UserHacks_EstimateTextureRegion " , false ) ;
2023-03-12 13:44:53 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . gpuPaletteConversion , " EmuCore/GS " , " paltex " , false ) ;
2023-03-19 12:24:29 +00:00
connect ( m_ui . cpuSpriteRenderBW , QOverload < int > : : of ( & QComboBox : : currentIndexChanged ) , this ,
& GraphicsSettingsWidget : : onCPUSpriteRenderBWChanged ) ;
2024-04-12 12:22:58 +00:00
connect ( m_ui . gpuPaletteConversion , & QCheckBox : : checkStateChanged , this , & GraphicsSettingsWidget : : onGpuPaletteConversionChanged ) ;
2023-03-19 12:24:29 +00:00
onCPUSpriteRenderBWChanged ( ) ;
onGpuPaletteConversionChanged ( m_ui . gpuPaletteConversion - > checkState ( ) ) ;
2021-12-13 12:12:54 +00:00
//////////////////////////////////////////////////////////////////////////
// HW Upscaling Fixes
//////////////////////////////////////////////////////////////////////////
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . halfPixelOffset , " EmuCore/GS " , " UserHacks_HalfPixelOffset " , 0 ) ;
2024-06-06 15:45:20 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . nativeScaling , " EmuCore/GS " , " UserHacks_native_scaling " , 0 ) ;
2022-03-14 22:43:25 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . roundSprite , " EmuCore/GS " , " UserHacks_round_sprite_offset " , 0 ) ;
2023-07-25 14:00:49 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . bilinearHack , " EmuCore/GS " , " UserHacks_BilinearHack " , 0 ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . textureOffsetX , " EmuCore/GS " , " UserHacks_TCOffsetX " , 0 ) ;
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . textureOffsetY , " EmuCore/GS " , " UserHacks_TCOffsetY " , 0 ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . alignSprite , " EmuCore/GS " , " UserHacks_align_sprite_X " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . mergeSprite , " EmuCore/GS " , " UserHacks_merge_pp_sprite " , false ) ;
2024-06-08 20:08:01 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . forceEvenSpritePosition , " EmuCore/GS " , " UserHacks_forceEvenSpritePosition " , false ) ;
2023-03-31 13:19:07 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . nativePaletteDraw , " EmuCore/GS " , " UserHacks_NativePaletteDraw " , false ) ;
2024-05-17 10:19:53 +00:00
2022-02-19 14:20:18 +00:00
//////////////////////////////////////////////////////////////////////////
// Texture Replacements
//////////////////////////////////////////////////////////////////////////
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . dumpReplaceableTextures , " EmuCore/GS " , " DumpReplaceableTextures " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . dumpReplaceableMipmaps , " EmuCore/GS " , " DumpReplaceableMipmaps " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . dumpTexturesWithFMVActive , " EmuCore/GS " , " DumpTexturesWithFMVActive " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . loadTextureReplacements , " EmuCore/GS " , " LoadTextureReplacements " , false ) ;
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting (
sif , m_ui . loadTextureReplacementsAsync , " EmuCore/GS " , " LoadTextureReplacementsAsync " , true ) ;
2022-02-19 14:20:18 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . precacheTextureReplacements , " EmuCore/GS " , " PrecacheTextureReplacements " , false ) ;
2022-06-18 10:48:03 +00:00
SettingWidgetBinder : : BindWidgetToFolderSetting ( sif , m_ui . texturesDirectory , m_ui . texturesBrowse , m_ui . texturesOpen , m_ui . texturesReset ,
2022-08-05 12:44:01 +00:00
" Folders " , " Textures " , Path : : Combine ( EmuFolders : : DataRoot , " textures " ) ) ;
2024-05-17 10:19:53 +00:00
connect ( m_ui . dumpReplaceableTextures , & QCheckBox : : checkStateChanged , this , & GraphicsSettingsWidget : : onTextureDumpChanged ) ;
connect ( m_ui . loadTextureReplacements , & QCheckBox : : checkStateChanged , this , & GraphicsSettingsWidget : : onTextureReplacementChanged ) ;
onTextureDumpChanged ( ) ;
onTextureReplacementChanged ( ) ;
2022-02-19 14:20:18 +00:00
2024-06-09 14:14:58 +00:00
if ( m_dialog - > isPerGameSettings ( ) )
{
m_ui . textureReplacementLayout - > removeWidget ( m_ui . texturesDirectoryBox ) ;
m_ui . texturesDirectoryBox - > deleteLater ( ) ;
m_ui . texturesDirectoryBox = nullptr ;
m_ui . texturesDirectory = nullptr ;
m_ui . texturesBrowse = nullptr ;
m_ui . texturesOpen = nullptr ;
m_ui . texturesReset = nullptr ;
m_ui . textureDescriptionText = nullptr ;
}
2021-12-13 12:12:54 +00:00
//////////////////////////////////////////////////////////////////////////
// Advanced Settings
//////////////////////////////////////////////////////////////////////////
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . useBlitSwapChain , " EmuCore/GS " , " UseBlitSwapChain " , false ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . useDebugDevice , " EmuCore/GS " , " UseDebugDevice " , false ) ;
2022-01-09 09:27:19 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . skipPresentingDuplicateFrames , " EmuCore/GS " , " SkipDuplicateFrames " , false ) ;
2024-05-26 02:44:16 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . disableMailboxPresentation , " EmuCore/GS " , " DisableMailboxPresentation " , false ) ;
2024-07-04 02:20:23 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . extendedUpscales , " EmuCore/GS " , " ExtendedUpscalingMultipliers " , false ) ;
2023-04-29 15:35:04 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . exclusiveFullscreenControl , " EmuCore/GS " , " ExclusiveFullscreenControl " , - 1 , - 1 ) ;
2022-01-05 11:13:27 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . overrideTextureBarriers , " EmuCore/GS " , " OverrideTextureBarriers " , - 1 , - 1 ) ;
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . gsDumpCompression , " EmuCore/GS " , " GSDumpCompression " , static_cast < int > ( GSDumpCompressionMethod : : Zstandard ) ) ;
2022-03-07 14:36:05 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . disableFramebufferFetch , " EmuCore/GS " , " DisableFramebufferFetch " , false ) ;
2023-05-05 12:43:27 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . disableShaderCache , " EmuCore/GS " , " DisableShaderCache " , false ) ;
2023-05-11 09:45:57 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . disableVertexShaderExpand , " EmuCore/GS " , " DisableVertexShaderExpand " , false ) ;
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . gsDownloadMode , " EmuCore/GS " , " HWDownloadMode " , static_cast < int > ( GSHardwareDownloadMode : : Enabled ) ) ;
2021-12-13 12:12:54 +00:00
//////////////////////////////////////////////////////////////////////////
// SW Settings
//////////////////////////////////////////////////////////////////////////
2022-08-01 23:58:29 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . swTextureFiltering , " EmuCore/GS " , " filter " , static_cast < int > ( BiFiltering : : PS2 ) ) ;
2022-02-15 14:29:18 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting ( sif , m_ui . extraSWThreads , " EmuCore/GS " , " extrathreads " , 2 ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . swAutoFlush , " EmuCore/GS " , " autoflush_sw " , true ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . swMipmap , " EmuCore/GS " , " mipmap " , true ) ;
2021-12-13 12:12:54 +00:00
//////////////////////////////////////////////////////////////////////////
// Non-trivial settings
//////////////////////////////////////////////////////////////////////////
2022-02-15 14:29:18 +00:00
const int renderer = m_dialog - > getEffectiveIntValue ( " EmuCore/GS " , " Renderer " , static_cast < int > ( GSRendererType : : Auto ) ) ;
2021-12-13 12:12:54 +00:00
for ( const RendererInfo & ri : s_renderer_info )
{
2024-06-12 09:56:12 +00:00
m_ui . rendererDropdown - > addItem ( qApp - > translate ( " GraphicsSettingsWidget " , ri . name ) ) ;
2022-02-15 14:29:18 +00:00
if ( renderer = = static_cast < int > ( ri . type ) )
2024-06-12 09:56:12 +00:00
m_ui . rendererDropdown - > setCurrentIndex ( m_ui . rendererDropdown - > count ( ) - 1 ) ;
2021-12-13 12:12:54 +00:00
}
2022-02-15 14:29:18 +00:00
// per-game override for renderer is slightly annoying, since we need to populate the global setting field
if ( sif )
{
2022-05-24 12:37:44 +00:00
const int global_renderer = Host : : GetBaseIntSettingValue ( " EmuCore/GS " , " Renderer " , static_cast < int > ( GSRendererType : : Auto ) ) ;
2022-02-15 14:29:18 +00:00
QString global_renderer_name ;
for ( const RendererInfo & ri : s_renderer_info )
{
2022-03-24 00:58:29 +00:00
if ( global_renderer = = static_cast < int > ( ri . type ) )
2022-02-15 14:29:18 +00:00
global_renderer_name = qApp - > translate ( " GraphicsSettingsWidget " , ri . name ) ;
}
2024-06-12 09:56:12 +00:00
m_ui . rendererDropdown - > insertItem ( 0 , tr ( " Use Global Setting [%1] " ) . arg ( global_renderer_name ) ) ;
2022-02-15 14:29:18 +00:00
2022-03-24 00:58:29 +00:00
// Effective Index already selected, set to global if setting is not per-game
2022-02-15 14:29:18 +00:00
int override_renderer ;
2022-03-24 00:58:29 +00:00
if ( ! sif - > GetIntValue ( " EmuCore/GS " , " Renderer " , & override_renderer ) )
2024-06-12 09:56:12 +00:00
m_ui . rendererDropdown - > setCurrentIndex ( 0 ) ;
2022-02-15 14:29:18 +00:00
}
2024-06-12 09:56:12 +00:00
connect ( m_ui . rendererDropdown , QOverload < int > : : of ( & QComboBox : : currentIndexChanged ) , this , & GraphicsSettingsWidget : : onRendererChanged ) ;
2024-04-12 12:22:58 +00:00
connect ( m_ui . enableHWFixes , & QCheckBox : : checkStateChanged , this , & GraphicsSettingsWidget : : updateRendererDependentOptions ) ;
2024-07-04 02:20:23 +00:00
connect ( m_ui . extendedUpscales , & QCheckBox : : checkStateChanged , this , & GraphicsSettingsWidget : : updateRendererDependentOptions ) ;
2022-08-01 23:58:29 +00:00
connect ( m_ui . textureFiltering , & QComboBox : : currentIndexChanged , this , & GraphicsSettingsWidget : : onTextureFilteringChange ) ;
connect ( m_ui . swTextureFiltering , & QComboBox : : currentIndexChanged , this , & GraphicsSettingsWidget : : onSWTextureFilteringChange ) ;
2021-12-13 12:12:54 +00:00
updateRendererDependentOptions ( ) ;
2023-04-29 15:35:04 +00:00
# ifndef _WIN32
// Exclusive fullscreen control is Windows-only.
m_ui . advancedOptionsFormLayout - > removeRow ( 2 ) ;
m_ui . exclusiveFullscreenControl = nullptr ;
# endif
2022-08-05 12:55:56 +00:00
# ifndef PCSX2_DEVBUILD
if ( ! m_dialog - > isPerGameSettings ( ) )
{
2022-12-04 05:45:58 +00:00
// Only allow disabling readbacks for per-game settings, it's too dangerous.
2022-12-18 13:05:00 +00:00
m_ui . advancedOptionsFormLayout - > removeRow ( 0 ) ;
2022-12-04 05:45:58 +00:00
m_ui . gsDownloadMode = nullptr ;
2023-03-12 13:44:53 +00:00
// Don't allow setting hardware fixes globally.
2024-07-04 02:20:23 +00:00
// Too many stupid YouTube "best settings" guides that break other games.
2023-03-12 13:44:53 +00:00
m_ui . hardwareRenderingOptionsLayout - > removeWidget ( m_ui . enableHWFixes ) ;
delete m_ui . enableHWFixes ;
m_ui . enableHWFixes = nullptr ;
2022-08-05 12:55:56 +00:00
}
# endif
2022-07-07 18:04:39 +00:00
2024-01-28 10:07:03 +00:00
// Get rid of widescreen/no-interlace checkboxes from per-game settings, unless the user previously had them set.
if ( m_dialog - > isPerGameSettings ( ) )
{
if ( ( m_dialog - > containsSettingValue ( " EmuCore " , " EnableWideScreenPatches " ) | | m_dialog - > containsSettingValue ( " EmuCore " , " EnableNoInterlacingPatches " ) ) & &
QMessageBox : : question ( QtUtils : : GetRootWidget ( this ) , tr ( " Remove Unsupported Settings " ) ,
tr ( " You currently have the <strong>Enable Widescreen Patches</strong> or <strong>Enable No-Interlacing Patches</strong> options enabled for this game.<br><br> "
" We no longer support these options, instead <strong>you should select the \" Patches \" section, and explicitly enable the patches you want.</strong><br><br> "
" Do you want to remove these options from your game configuration now? " ) ,
QMessageBox : : Yes , QMessageBox : : No ) = = QMessageBox : : Yes )
{
m_dialog - > removeSettingValue ( " EmuCore " , " EnableWideScreenPatches " ) ;
m_dialog - > removeSettingValue ( " EmuCore " , " EnableNoInterlacingPatches " ) ;
}
2024-06-12 09:56:12 +00:00
m_ui . displayGridLayout - > removeWidget ( m_ui . widescreenPatches ) ;
m_ui . displayGridLayout - > removeWidget ( m_ui . noInterlacingPatches ) ;
2024-01-28 10:07:03 +00:00
safe_delete ( m_ui . widescreenPatches ) ;
2024-08-05 09:08:30 +00:00
safe_delete ( m_ui . noInterlacingPatches ) ;
2024-01-28 10:07:03 +00:00
}
2023-12-25 14:29:57 +00:00
// Hide advanced options by default.
if ( ! QtHost : : ShouldShowAdvancedSettings ( ) )
{
// Advanced is always the last tab. Index is different for HW vs SW.
m_ui . tabs - > removeTab ( m_ui . tabs - > count ( ) - 1 ) ;
m_ui . advancedTab - > deleteLater ( ) ;
m_ui . advancedTab = nullptr ;
m_ui . gsDownloadMode = nullptr ;
m_ui . gsDumpCompression = nullptr ;
m_ui . exclusiveFullscreenControl = nullptr ;
m_ui . useBlitSwapChain = nullptr ;
2024-05-26 02:44:16 +00:00
m_ui . disableMailboxPresentation = nullptr ;
2024-07-04 02:20:23 +00:00
m_ui . extendedUpscales = nullptr ;
2023-12-25 14:29:57 +00:00
m_ui . skipPresentingDuplicateFrames = nullptr ;
m_ui . overrideTextureBarriers = nullptr ;
m_ui . disableFramebufferFetch = nullptr ;
m_ui . disableShaderCache = nullptr ;
m_ui . disableVertexShaderExpand = nullptr ;
m_ui . useDebugDevice = nullptr ;
}
2022-12-18 13:05:00 +00:00
// Capture settings
{
2023-01-19 14:01:54 +00:00
for ( const char * * container = Pcsx2Config : : GSOptions : : CaptureContainers ; * container ; container + + )
2022-12-18 13:05:00 +00:00
{
const QString name ( QString : : fromUtf8 ( * container ) ) ;
2023-01-19 14:01:54 +00:00
m_ui . captureContainer - > addItem ( name . toUpper ( ) , name ) ;
2022-12-18 13:05:00 +00:00
}
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToFolderSetting ( sif , m_ui . videoDumpingDirectory , m_ui . videoDumpingDirectoryBrowse ,
m_ui . videoDumpingDirectoryOpen , m_ui . videoDumpingDirectoryReset , " Folders " , " Videos " ,
Path : : Combine ( EmuFolders : : DataRoot , " videos " ) ) ;
2023-01-12 09:30:39 +00:00
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToStringSetting ( sif , m_ui . captureContainer , " EmuCore/GS " , " CaptureContainer " ) ;
connect ( m_ui . captureContainer , & QComboBox : : currentIndexChanged , this , & GraphicsSettingsWidget : : onCaptureContainerChanged ) ;
2022-12-18 13:05:00 +00:00
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . enableVideoCapture , " EmuCore/GS " , " EnableVideoCapture " , true ) ;
2022-12-18 13:05:00 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . videoCaptureBitrate , " EmuCore/GS " , " VideoCaptureBitrate " , Pcsx2Config : : GSOptions : : DEFAULT_VIDEO_CAPTURE_BITRATE ) ;
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . videoCaptureWidth , " EmuCore/GS " , " VideoCaptureWidth " , Pcsx2Config : : GSOptions : : DEFAULT_VIDEO_CAPTURE_WIDTH ) ;
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . videoCaptureHeight , " EmuCore/GS " , " VideoCaptureHeight " , Pcsx2Config : : GSOptions : : DEFAULT_VIDEO_CAPTURE_HEIGHT ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting (
sif , m_ui . videoCaptureResolutionAuto , " EmuCore/GS " , " VideoCaptureAutoResolution " , true ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting (
sif , m_ui . enableVideoCaptureArguments , " EmuCore/GS " , " EnableVideoCaptureParameters " , false ) ;
2023-01-12 09:30:39 +00:00
SettingWidgetBinder : : BindWidgetToStringSetting ( sif , m_ui . videoCaptureArguments , " EmuCore/GS " , " VideoCaptureParameters " ) ;
2024-04-12 12:22:58 +00:00
connect ( m_ui . enableVideoCapture , & QCheckBox : : checkStateChanged , this , & GraphicsSettingsWidget : : onEnableVideoCaptureChanged ) ;
2023-01-19 14:01:54 +00:00
connect (
2024-04-12 12:22:58 +00:00
m_ui . videoCaptureResolutionAuto , & QCheckBox : : checkStateChanged , this , & GraphicsSettingsWidget : : onVideoCaptureAutoResolutionChanged ) ;
connect ( m_ui . enableVideoCaptureArguments , & QCheckBox : : checkStateChanged , this ,
2023-01-19 14:01:54 +00:00
& GraphicsSettingsWidget : : onEnableVideoCaptureArgumentsChanged ) ;
2023-01-12 09:30:39 +00:00
2023-01-19 14:01:54 +00:00
SettingWidgetBinder : : BindWidgetToBoolSetting ( sif , m_ui . enableAudioCapture , " EmuCore/GS " , " EnableAudioCapture " , true ) ;
SettingWidgetBinder : : BindWidgetToIntSetting (
sif , m_ui . audioCaptureBitrate , " EmuCore/GS " , " AudioCaptureBitrate " , Pcsx2Config : : GSOptions : : DEFAULT_AUDIO_CAPTURE_BITRATE ) ;
SettingWidgetBinder : : BindWidgetToBoolSetting (
sif , m_ui . enableAudioCaptureArguments , " EmuCore/GS " , " EnableAudioCaptureParameters " , false ) ;
SettingWidgetBinder : : BindWidgetToStringSetting ( sif , m_ui . audioCaptureArguments , " EmuCore/GS " , " AudioCaptureParameters " ) ;
2024-04-12 12:22:58 +00:00
connect ( m_ui . enableAudioCapture , & QCheckBox : : checkStateChanged , this , & GraphicsSettingsWidget : : onEnableAudioCaptureChanged ) ;
connect ( m_ui . enableAudioCaptureArguments , & QCheckBox : : checkStateChanged , this ,
2023-01-19 14:01:54 +00:00
& GraphicsSettingsWidget : : onEnableAudioCaptureArgumentsChanged ) ;
onCaptureContainerChanged ( ) ;
2024-07-20 12:14:28 +00:00
onCaptureCodecChanged ( ) ;
2023-01-19 14:01:54 +00:00
onEnableVideoCaptureChanged ( ) ;
2023-01-12 09:30:39 +00:00
onEnableVideoCaptureArgumentsChanged ( ) ;
2023-01-19 14:01:54 +00:00
onVideoCaptureAutoResolutionChanged ( ) ;
onEnableAudioCaptureChanged ( ) ;
onEnableAudioCaptureArgumentsChanged ( ) ;
2024-06-09 14:59:40 +00:00
if ( m_dialog - > isPerGameSettings ( ) )
{
m_ui . recordingTabLayout - > removeWidget ( m_ui . videoDumpDirectory ) ;
m_ui . videoDumpDirectory - > deleteLater ( ) ;
m_ui . videoDumpDirectory = nullptr ;
m_ui . videoDumpLayout = nullptr ;
m_ui . videoDumpingDirectory = nullptr ;
m_ui . videoDumpingDirectoryBrowse = nullptr ;
m_ui . videoDumpingDirectoryOpen = nullptr ;
m_ui . videoDumpingDirectoryReset = nullptr ;
}
2022-12-18 13:05:00 +00:00
}
2022-06-04 21:35:31 +00:00
// Display tab
{
2022-12-18 09:11:35 +00:00
dialog - > registerWidgetHelp ( m_ui . widescreenPatches , tr ( " Enable Widescreen Patches " ) , tr ( " Unchecked " ) ,
tr ( " Automatically loads and applies widescreen patches on game start. Can cause issues. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . noInterlacingPatches , tr ( " Enable No-Interlacing Patches " ) , tr ( " Unchecked " ) ,
tr ( " Automatically loads and applies no-interlacing patches on game start. Can cause issues. " ) ) ;
2022-07-06 09:58:43 +00:00
2022-07-09 13:00:42 +00:00
dialog - > registerWidgetHelp ( m_ui . DisableInterlaceOffset , tr ( " Disable Interlace Offset " ) , tr ( " Unchecked " ) ,
2022-07-06 09:58:43 +00:00
tr ( " Disables interlacing offset which may reduce blurring in some situations. " ) ) ;
2022-12-04 22:10:09 +00:00
dialog - > registerWidgetHelp ( m_ui . bilinearFiltering , tr ( " Bilinear Filtering " ) , tr ( " Bilinear (Smooth) " ) ,
2023-01-19 14:01:54 +00:00
tr ( " Enables bilinear post processing filter. Smooths the overall picture as it is displayed on the screen. Corrects "
" positioning between pixels. " ) ) ;
2022-07-06 09:58:43 +00:00
2022-07-09 13:00:42 +00:00
dialog - > registerWidgetHelp ( m_ui . PCRTCOffsets , tr ( " Screen Offsets " ) , tr ( " Unchecked " ) ,
2023-03-18 21:14:55 +00:00
//: PCRTC: Programmable CRT (Cathode Ray Tube) Controller.
2023-01-19 14:01:54 +00:00
tr ( " Enables PCRTC Offsets which position the screen as the game requests. Useful for some games such as WipEout Fusion for its "
" screen shake effect, but can make the picture blurry. " ) ) ;
2022-07-06 09:58:43 +00:00
2022-07-09 13:00:42 +00:00
dialog - > registerWidgetHelp ( m_ui . PCRTCOverscan , tr ( " Show Overscan " ) , tr ( " Unchecked " ) ,
2022-07-06 09:58:43 +00:00
tr ( " Enables the option to show the overscan area on games which draw more than the safe area of the screen. " ) ) ;
2023-04-29 15:35:04 +00:00
dialog - > registerWidgetHelp (
2024-08-01 00:38:10 +00:00
m_ui . fmvAspectRatio , tr ( " FMV Aspect Ratio Override " ) , tr ( " Off (Default) " ) ,
2024-07-31 23:41:50 +00:00
tr ( " Overrides the full-motion video (FMV) aspect ratio. "
2024-08-01 00:38:10 +00:00
" If disabled, the FMV Aspect Ratio will match the same value as the general Aspect Ratio setting. " ) ) ;
2023-01-19 14:01:54 +00:00
2022-07-05 23:30:19 +00:00
dialog - > registerWidgetHelp ( m_ui . PCRTCAntiBlur , tr ( " Anti-Blur " ) , tr ( " Checked " ) ,
tr ( " Enables internal Anti-Blur hacks. Less accurate to PS2 rendering but will make a lot of games look less blurry. " ) ) ;
2023-01-19 14:01:54 +00:00
2022-08-16 02:42:19 +00:00
dialog - > registerWidgetHelp ( m_ui . integerScaling , tr ( " Integer Scaling " ) , tr ( " Unchecked " ) ,
2023-01-19 14:01:54 +00:00
tr ( " Adds padding to the display area to ensure that the ratio between pixels on the host to pixels in the console is an "
" integer number. May result in a sharper image in some 2D games. " ) ) ;
2023-01-14 20:12:07 +00:00
dialog - > registerWidgetHelp ( m_ui . aspectRatio , tr ( " Aspect Ratio " ) , tr ( " Auto Standard (4:3/3:2 Progressive) " ) ,
2023-01-19 14:01:54 +00:00
tr ( " Changes the aspect ratio used to display the console's output to the screen. The default is Auto Standard (4:3/3:2 "
" Progressive) which automatically adjusts the aspect ratio to match how a game would be shown on a typical TV of the era. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-12-31 16:07:18 +00:00
dialog - > registerWidgetHelp ( m_ui . interlacing , tr ( " Deinterlacing " ) , tr ( " Automatic (Default) " ) , tr ( " Determines the deinterlacing method to be used on the interlaced screen of the emulated console. Automatic should be able to correctly deinterlace most games, but if you see visibly shaky graphics, try one of the available options. " ) ) ;
2022-12-07 01:26:21 +00:00
2022-12-10 09:11:08 +00:00
dialog - > registerWidgetHelp ( m_ui . screenshotSize , tr ( " Screenshot Size " ) , tr ( " Screen Resolution " ) ,
2023-01-19 14:01:54 +00:00
tr ( " Determines the resolution at which screenshots will be saved. Internal resolutions preserve more detail at the cost of "
" file size. " ) ) ;
2022-12-18 09:11:35 +00:00
2022-12-10 09:11:08 +00:00
dialog - > registerWidgetHelp ( m_ui . screenshotFormat , tr ( " Screenshot Format " ) , tr ( " PNG " ) ,
tr ( " Selects the format which will be used to save screenshots. JPEG produces smaller files, but loses detail. " ) ) ;
2022-12-18 09:11:35 +00:00
2022-12-10 09:11:08 +00:00
dialog - > registerWidgetHelp ( m_ui . screenshotQuality , tr ( " Screenshot Quality " ) , tr ( " 50% " ) ,
2023-01-19 14:01:54 +00:00
tr ( " Selects the quality at which screenshots will be compressed. Higher values preserve more detail for JPEG, and reduce file "
" size for PNG. " ) ) ;
2022-12-10 09:11:08 +00:00
2023-03-13 00:34:20 +00:00
dialog - > registerWidgetHelp ( m_ui . stretchY , tr ( " Vertical Stretch " ) , tr ( " 100% " ) ,
// Characters </> need to be converted into entities in order to be shown correctly.
tr ( " Stretches (< 100%) or squashes (> 100%) the vertical component of the display. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-01-14 20:12:07 +00:00
dialog - > registerWidgetHelp ( m_ui . fullscreenModes , tr ( " Fullscreen Mode " ) , tr ( " Borderless Fullscreen " ) ,
tr ( " Chooses the fullscreen resolution and frequency. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-04-29 15:35:04 +00:00
dialog - > registerWidgetHelp (
m_ui . cropLeft , tr ( " Left " ) , tr ( " 0px " ) , tr ( " Changes the number of pixels cropped from the left side of the display. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-04-29 15:35:04 +00:00
dialog - > registerWidgetHelp (
m_ui . cropTop , tr ( " Top " ) , tr ( " 0px " ) , tr ( " Changes the number of pixels cropped from the top of the display. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-04-29 15:35:04 +00:00
dialog - > registerWidgetHelp (
m_ui . cropRight , tr ( " Right " ) , tr ( " 0px " ) , tr ( " Changes the number of pixels cropped from the right side of the display. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-04-29 15:35:04 +00:00
dialog - > registerWidgetHelp (
m_ui . cropBottom , tr ( " Bottom " ) , tr ( " 0px " ) , tr ( " Changes the number of pixels cropped from the bottom of the display. " ) ) ;
2022-06-04 21:35:31 +00:00
}
// Rendering tab
{
// Hardware
2023-02-18 01:58:32 +00:00
dialog - > registerWidgetHelp ( m_ui . upscaleMultiplier , tr ( " Internal Resolution " ) , tr ( " Native (PS2) (Default) " ) ,
2023-03-18 21:14:55 +00:00
tr ( " Control the resolution at which games are rendered. High resolutions can impact performance on "
2023-02-18 01:58:32 +00:00
" older or lower-end GPUs.<br>Non-native resolution may cause minor graphical issues in some games.<br> "
" FMV resolution will remain unchanged, as the video files are pre-rendered. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-01-19 14:01:54 +00:00
dialog - > registerWidgetHelp (
2024-09-12 19:07:12 +00:00
m_ui . mipmapping , tr ( " Mipmapping " ) , tr ( " Checked " ) , tr ( " Enables mipmapping, which some games require to render correctly. Mipmapping uses progressively lower resolution variants of textures at progressively further distances to reduce processing load and avoid visual artifacts. " ) ) ;
2022-06-04 21:35:31 +00:00
2023-01-19 14:01:54 +00:00
dialog - > registerWidgetHelp (
2024-08-03 20:48:26 +00:00
m_ui . textureFiltering , tr ( " Texture Filtering " ) , tr ( " Bilinear (PS2) " ) ,
tr ( " Changes what filtering algorithm is used to map textures to surfaces.<br> "
" Nearest: Makes no attempt to blend colors.<br> "
" Bilinear (Forced): Will blend colors together to remove harsh edges between different colored pixels even if the game told the PS2 not to.<br> "
" Bilinear (PS2): Will apply filtering to all surfaces that a game instructs the PS2 to filter.<br> "
" Bilinear (Forced Excluding Sprites): Will apply filtering to all surfaces, even if the game told the PS2 not to, except sprites. " ) ) ;
2022-06-04 21:35:31 +00:00
dialog - > registerWidgetHelp ( m_ui . trilinearFiltering , tr ( " Trilinear Filtering " ) , tr ( " Automatic (Default) " ) ,
2024-08-11 04:06:15 +00:00
tr ( " Reduces blurriness of large textures applied to small, steeply angled surfaces by sampling colors from the two nearest Mipmaps. Requires Mipmapping to be 'on'.<br> "
" Off: Disables the feature.<br> "
" Trilinear (PS2): Applies Trilinear filtering to all surfaces that a game instructs the PS2 to.<br> "
" Trilinear (Forced): Applies Trilinear filtering to all surfaces, even if the game told the PS2 not to. " ) ) ;
2022-06-04 21:35:31 +00:00
dialog - > registerWidgetHelp ( m_ui . anisotropicFiltering , tr ( " Anisotropic Filtering " ) , tr ( " Off (Default) " ) ,
tr ( " Reduces texture aliasing at extreme viewing angles. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . dithering , tr ( " Dithering " ) , tr ( " Unscaled (Default) " ) ,
2022-12-07 01:49:54 +00:00
tr ( " Reduces banding between colors and improves the perceived color depth.<br> "
" Off: Disables any dithering.<br> "
2024-05-25 13:39:43 +00:00
" Scaled: Upscaling-aware / Highest dithering effect.<br> "
2022-12-07 01:49:54 +00:00
" Unscaled: Native Dithering / Lowest dithering effect does not increase size of squares when upscaling.<br> "
2024-05-25 13:39:43 +00:00
" Force 32bit: Treat all draws as if they were 32bit to avoid banding and dithering. " ) ) ;
2022-06-04 21:35:31 +00:00
dialog - > registerWidgetHelp ( m_ui . blending , tr ( " Blending Accuracy " ) , tr ( " Basic (Recommended) " ) ,
2023-01-12 09:30:39 +00:00
tr ( " Control the accuracy level of the GS blending unit emulation.<br> "
2023-01-19 14:01:54 +00:00
" The higher the setting, the more blending is emulated in the shader accurately, and the higher the speed penalty will "
" be.<br> "
2023-03-13 00:34:20 +00:00
" Do note that Direct3D's blending is reduced in capability compared to OpenGL/Vulkan. " ) ) ;
2022-06-04 21:35:31 +00:00
2022-07-28 21:20:31 +00:00
dialog - > registerWidgetHelp ( m_ui . texturePreloading , tr ( " Texture Preloading " ) , tr ( " Full (Hash Cache) " ) ,
2022-06-04 21:35:31 +00:00
tr ( " Uploads entire textures at once instead of small pieces, avoiding redundant uploads when possible. "
" Improves performance in most games, but can make a small selection slower. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . gpuPaletteConversion , tr ( " GPU Palette Conversion " ) , tr ( " Unchecked " ) ,
tr ( " When enabled GPU converts colormap-textures, otherwise the CPU will. "
" It is a trade-off between GPU and CPU. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . enableHWFixes , tr ( " Manual Hardware Renderer Fixes " ) , tr ( " Unchecked " ) ,
tr ( " Enabling this option gives you the ability to change the renderer and upscaling fixes "
" to your games. However IF you have ENABLED this, you WILL DISABLE AUTOMATIC "
" SETTINGS and you can re-enable automatic settings by unchecking this option. " ) ) ;
2022-10-24 14:17:27 +00:00
dialog - > registerWidgetHelp ( m_ui . spinCPUDuringReadbacks , tr ( " Spin CPU During Readbacks " ) , tr ( " Unchecked " ) ,
tr ( " Does useless work on the CPU during readbacks to prevent it from going to into powersave modes. "
2024-02-12 10:01:29 +00:00
" May improve performance during readbacks but with a significant increase in power usage. " ) ) ;
2022-09-28 06:54:33 +00:00
2022-10-24 14:17:27 +00:00
dialog - > registerWidgetHelp ( m_ui . spinGPUDuringReadbacks , tr ( " Spin GPU During Readbacks " ) , tr ( " Unchecked " ) ,
tr ( " Submits useless work to the GPU during readbacks to prevent it from going into powersave modes. "
2024-02-12 10:01:29 +00:00
" May improve performance during readbacks but with a significant increase in power usage. " ) ) ;
2022-09-18 01:46:27 +00:00
2022-06-04 21:35:31 +00:00
// Software
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . extraSWThreads , tr ( " Software Rendering Threads " ) , tr ( " 2 threads " ) ,
2022-06-04 21:35:31 +00:00
tr ( " Number of rendering threads: 0 for single thread, 2 or more for multithread (1 is for debugging). "
2024-02-18 17:56:42 +00:00
" 2 to 4 threads is recommended, any more than that is likely to be slower instead of faster. " ) ) ;
2022-06-04 21:35:31 +00:00
dialog - > registerWidgetHelp ( m_ui . swAutoFlush , tr ( " Auto Flush " ) , tr ( " Checked " ) ,
tr ( " Force a primitive flush when a framebuffer is also an input texture. "
" Fixes some processing effects such as the shadows in the Jak series and radiosity in GTA:SA. " ) ) ;
2023-01-19 14:01:54 +00:00
dialog - > registerWidgetHelp (
m_ui . swMipmap , tr ( " Mipmapping " ) , tr ( " Checked " ) , tr ( " Enables mipmapping, which some games require to render correctly. " ) ) ;
2022-06-04 21:35:31 +00:00
}
// Hardware Fixes tab
{
2024-08-05 09:08:30 +00:00
dialog - > registerWidgetHelp ( m_ui . cpuSpriteRenderBW , tr ( " CPU Sprite Render Size " ) , tr ( " 0 (Disabled) " ) ,
2023-12-30 11:09:16 +00:00
tr ( " The maximum target memory width that will allow the CPU Sprite Renderer to activate on. " ) ) ;
2022-12-07 01:26:21 +00:00
2024-08-05 09:08:30 +00:00
dialog - > registerWidgetHelp ( m_ui . cpuCLUTRender , tr ( " Software CLUT Render " ) , tr ( " 0 (Disabled) " ) ,
2023-12-30 11:09:16 +00:00
tr ( " Tries to detect when a game is drawing its own color palette and then renders it in software, instead of on the GPU. " ) ) ;
2024-08-05 09:08:30 +00:00
dialog - > registerWidgetHelp ( m_ui . gpuTargetCLUTMode , tr ( " GPU Target CLUT " ) , tr ( " Disabled " ) ,
2023-12-31 16:07:18 +00:00
tr ( " Try to detect when a game is drawing its own color palette and then renders it on the GPU with special handling. " ) ) ;
2022-12-07 01:26:21 +00:00
2022-06-04 21:35:31 +00:00
dialog - > registerWidgetHelp ( m_ui . skipDrawStart , tr ( " Skipdraw Range Start " ) , tr ( " 0 " ) ,
tr ( " Completely skips drawing surfaces from the surface in the left box up to the surface specified in the box on the right. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . skipDrawEnd , tr ( " Skipdraw Range End " ) , tr ( " 0 " ) ,
tr ( " Completely skips drawing surfaces from the surface in the left box up to the surface specified in the box on the right. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . hwAutoFlush , tr ( " Auto Flush " ) , tr ( " Unchecked " ) ,
tr ( " Force a primitive flush when a framebuffer is also an input texture. "
" Fixes some processing effects such as the shadows in the Jak series and radiosity in GTA:SA. " ) ) ;
2024-02-12 10:01:29 +00:00
dialog - > registerWidgetHelp ( m_ui . disableDepthEmulation , tr ( " Disable Depth Conversion " ) , tr ( " Unchecked " ) ,
2023-12-06 11:54:52 +00:00
tr ( " Disable the support of depth buffers in the texture cache. "
2024-02-12 10:01:29 +00:00
" Will likely create various glitches and is only useful for debugging. " ) ) ;
2022-06-04 21:35:31 +00:00
dialog - > registerWidgetHelp ( m_ui . disableSafeFeatures , tr ( " Disable Safe Features " ) , tr ( " Unchecked " ) ,
tr ( " This option disables multiple safe features. "
" Disables accurate Unscale Point and Line rendering which can help Xenosaga games. "
2023-01-19 14:01:54 +00:00
" Disables accurate GS Memory Clearing to be done on the CPU, and let the GPU handle it, which can help Kingdom Hearts "
" games. " ) ) ;
2022-06-04 21:35:31 +00:00
2023-05-11 10:41:26 +00:00
dialog - > registerWidgetHelp (
m_ui . disableRenderFixes , tr ( " Disable Render Fixes " ) , tr ( " Unchecked " ) , tr ( " This option disables game-specific render fixes. " ) ) ;
2023-02-24 14:06:53 +00:00
dialog - > registerWidgetHelp ( m_ui . disablePartialInvalidation , tr ( " Disable Partial Source Invalidation " ) , tr ( " Unchecked " ) ,
2022-06-04 21:35:31 +00:00
tr ( " By default, the texture cache handles partial invalidations. Unfortunately it is very costly to compute CPU wise. "
" This hack replaces the partial invalidation with a complete deletion of the texture to reduce the CPU load. "
2023-03-13 00:34:20 +00:00
" It helps with the Snowblind engine games. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . frameBufferConversion , tr ( " Framebuffer Conversion " ) , tr ( " Unchecked " ) ,
tr ( " Convert 4-bit and 8-bit framebuffer on the CPU instead of the GPU. "
2022-06-04 21:35:31 +00:00
" Helps Harry Potter and Stuntman games. It has a big impact on performance. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . preloadFrameData , tr ( " Preload Frame Data " ) , tr ( " Unchecked " ) ,
2023-12-06 11:54:52 +00:00
tr ( " Uploads GS data when rendering a new frame to reproduce some effects accurately. " ) ) ;
2022-06-04 21:35:31 +00:00
2023-02-26 12:15:48 +00:00
dialog - > registerWidgetHelp ( m_ui . textureInsideRt , tr ( " Texture Inside RT " ) , tr ( " Disabled " ) ,
2023-02-24 14:06:53 +00:00
tr ( " Allows the texture cache to reuse as an input texture the inner portion of a previous framebuffer. " ) ) ;
2023-02-23 11:00:48 +00:00
dialog - > registerWidgetHelp ( m_ui . readTCOnClose , tr ( " Read Targets When Closing " ) , tr ( " Unchecked " ) ,
tr ( " Flushes all targets in the texture cache back to local memory when shutting down. Can prevent lost visuals when saving "
" state or switching renderers, but can also cause graphical corruption. " ) ) ;
2023-02-24 14:06:53 +00:00
2023-02-15 11:51:34 +00:00
dialog - > registerWidgetHelp ( m_ui . estimateTextureRegion , tr ( " Estimate Texture Region " ) , tr ( " Unchecked " ) ,
tr ( " Attempts to reduce the texture size when games do not set it themselves (e.g. Snowblind games). " ) ) ;
2022-06-04 21:35:31 +00:00
}
// Upscaling Fixes tab
{
dialog - > registerWidgetHelp ( m_ui . halfPixelOffset , tr ( " Half Pixel Offset " ) , tr ( " Off (Default) " ) ,
tr ( " Might fix some misaligned fog, bloom, or blend effect. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . roundSprite , tr ( " Round Sprite " ) , tr ( " Off (Default) " ) ,
tr ( " Corrects the sampling of 2D sprite textures when upscaling. "
2023-01-19 14:01:54 +00:00
" Fixes lines in sprites of games like Ar tonelico when upscaling. Half option is for flat sprites, Full is for all "
" sprites. " ) ) ;
2022-06-04 21:35:31 +00:00
2022-06-07 00:28:12 +00:00
dialog - > registerWidgetHelp ( m_ui . textureOffsetX , tr ( " Texture Offsets X " ) , tr ( " 0 " ) ,
2023-03-18 21:14:55 +00:00
//: ST and UV are different types of texture coordinates, like XY would be spatial coordinates.
2023-01-19 14:01:54 +00:00
tr ( " Offset for the ST/UV texture coordinates. Fixes some odd texture issues and might fix some post processing alignment "
" too. " ) ) ;
2022-06-04 21:35:31 +00:00
2022-06-07 00:28:12 +00:00
dialog - > registerWidgetHelp ( m_ui . textureOffsetY , tr ( " Texture Offsets Y " ) , tr ( " 0 " ) ,
2023-03-18 21:14:55 +00:00
//: ST and UV are different types of texture coordinates, like XY would be spatial coordinates.
2023-01-19 14:01:54 +00:00
tr ( " Offset for the ST/UV texture coordinates. Fixes some odd texture issues and might fix some post processing alignment "
" too. " ) ) ;
2022-06-04 21:35:31 +00:00
dialog - > registerWidgetHelp ( m_ui . alignSprite , tr ( " Align Sprite " ) , tr ( " Unchecked " ) ,
2023-03-18 21:14:55 +00:00
//: Namco: a game publisher and development company. Leave the name as-is. Ace Combat, Tekken, Soul Calibur: game names. Leave as-is or use official translations.
2023-03-13 00:34:20 +00:00
tr ( " Fixes issues with upscaling (vertical lines) in Namco games like Ace Combat, Tekken, Soul Calibur, etc. " ) ) ;
2022-06-04 21:35:31 +00:00
2024-06-08 20:08:01 +00:00
dialog - > registerWidgetHelp ( m_ui . forceEvenSpritePosition , tr ( " Force Even Sprite Position " ) , tr ( " Unchecked " ) ,
2023-03-18 21:14:55 +00:00
//: Wild Arms: name of a game series. Leave as-is or use an official translation.
2022-06-04 21:35:31 +00:00
tr ( " Lowers the GS precision to avoid gaps between pixels when upscaling. Fixes the text on Wild Arms games. " ) ) ;
2023-03-16 02:50:59 +00:00
dialog - > registerWidgetHelp ( m_ui . bilinearHack , tr ( " Bilinear Upscale " ) , tr ( " Unchecked " ) ,
tr ( " Can smooth out textures due to be bilinear filtered when upscaling. E.g. Brave sun glare. " ) ) ;
2022-06-04 21:35:31 +00:00
dialog - > registerWidgetHelp ( m_ui . mergeSprite , tr ( " Merge Sprite " ) , tr ( " Unchecked " ) ,
tr ( " Replaces post-processing multiple paving sprites by a single fat sprite. It reduces various upscaling lines. " ) ) ;
2023-12-30 11:09:16 +00:00
dialog - > registerWidgetHelp ( m_ui . nativePaletteDraw , tr ( " Unscaled Palette Texture Draws " ) , tr ( " Unchecked " ) ,
tr ( " Force palette texture draws to render at native resolution. " ) ) ;
2022-06-04 21:35:31 +00:00
}
2022-12-07 01:26:21 +00:00
// Texture Replacement tab
{
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . dumpReplaceableTextures , tr ( " Dump Textures " ) , tr ( " Unchecked " ) , tr ( " Dumps replaceable textures to disk. Will reduce performance. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . dumpReplaceableMipmaps , tr ( " Dump Mipmaps " ) , tr ( " Unchecked " ) , tr ( " Includes mipmaps when dumping textures. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . dumpTexturesWithFMVActive , tr ( " Dump FMV Textures " ) , tr ( " Unchecked " ) , tr ( " Allows texture dumping when FMVs are active. You should not enable this. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . loadTextureReplacementsAsync , tr ( " Asynchronous Texture Loading " ) , tr ( " Checked " ) , tr ( " Loads replacement textures on a worker thread, reducing microstutter when replacements are enabled. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . loadTextureReplacements , tr ( " Load Textures " ) , tr ( " Unchecked " ) , tr ( " Loads replacement textures where available and user-provided. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . precacheTextureReplacements , tr ( " Precache Textures " ) , tr ( " Unchecked " ) , tr ( " Preloads all replacement textures to memory. Not necessary with asynchronous loading. " ) ) ;
2022-12-07 01:26:21 +00:00
}
// Post Processing tab
{
2023-03-18 21:14:55 +00:00
//: You might find an official translation for this on AMD's website (Spanish version linked): https://www.amd.com/es/technologies/radeon-software-fidelityfx
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . casMode , tr ( " Contrast Adaptive Sharpening " ) , tr ( " None (Default) " ) , tr ( " Enables FidelityFX Contrast Adaptive Sharpening. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . casSharpness , tr ( " Sharpness " ) , tr ( " 50% " ) , tr ( " Determines the intensity the sharpening effect in CAS post-processing. " ) ) ;
2022-12-07 01:26:21 +00:00
dialog - > registerWidgetHelp ( m_ui . shadeBoost , tr ( " Shade Boost " ) , tr ( " Unchecked " ) ,
2023-01-19 14:01:54 +00:00
tr ( " Enables saturation, contrast, and brightness to be adjusted. Values of brightness, saturation, and contrast are at default "
" 50. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-01-19 14:01:54 +00:00
dialog - > registerWidgetHelp (
m_ui . fxaa , tr ( " FXAA " ) , tr ( " Unchecked " ) , tr ( " Applies the FXAA anti-aliasing algorithm to improve the visual quality of games. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . shadeBoostBrightness , tr ( " Brightness " ) , tr ( " 50 " ) , tr ( " Adjusts brightness. 50 is normal. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . shadeBoostContrast , tr ( " Contrast " ) , tr ( " 50 " ) , tr ( " Adjusts contrast. 50 is normal. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . shadeBoostSaturation , tr ( " Saturation " ) , tr ( " 50 " ) , tr ( " Adjusts saturation. 50 is normal. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-02-18 01:58:32 +00:00
dialog - > registerWidgetHelp ( m_ui . tvShader , tr ( " TV Shader " ) , tr ( " None (Default) " ) ,
tr ( " Applies a shader which replicates the visual effects of different styles of television set. " ) ) ;
2022-12-07 01:26:21 +00:00
}
// OSD tab
{
2023-04-29 15:35:04 +00:00
dialog - > registerWidgetHelp ( m_ui . osdScale , tr ( " OSD Scale " ) , tr ( " 100% " ) , tr ( " Scales the size of the onscreen OSD from 50% to 500%. " ) ) ;
2022-12-07 01:26:21 +00:00
2024-07-29 05:43:28 +00:00
dialog - > registerWidgetHelp ( m_ui . osdMessagesPos , tr ( " OSD Messages Position " ) , tr ( " Left (Default) " ) ,
2022-12-07 01:26:21 +00:00
tr ( " Shows on-screen-display messages when events occur such as save states being "
" created/loaded, screenshots being taken, etc. " ) ) ;
2024-08-05 09:08:30 +00:00
2024-07-29 05:43:28 +00:00
dialog - > registerWidgetHelp ( m_ui . osdPerformancePos , tr ( " OSD Statistics Position " ) , tr ( " Right (Default) " ) ,
tr ( " Shows a variety of on-screen performance data points as selected by the user. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-03-13 00:34:20 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowFPS , tr ( " Show FPS " ) , tr ( " Unchecked " ) ,
2022-12-07 01:26:21 +00:00
tr ( " Shows the internal frame rate of the game in the top-right corner of the display. " ) ) ;
2024-09-14 13:40:48 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowVPS , tr ( " Show VPS " ) , tr ( " Unchecked " ) ,
tr ( " Shows the vsync rate of the emulator in the top-right corner of the display. " ) ) ;
2023-03-13 00:34:20 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowSpeed , tr ( " Show Speed Percentages " ) , tr ( " Unchecked " ) ,
2022-12-07 01:26:21 +00:00
tr ( " Shows the current emulation speed of the system in the top-right corner of the display as a percentage. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . osdShowResolution , tr ( " Show Resolution " ) , tr ( " Unchecked " ) ,
tr ( " Shows the resolution of the game in the top-right corner of the display. " ) ) ;
2023-01-19 14:01:54 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowCPU , tr ( " Show CPU Usage " ) , tr ( " Unchecked " ) , tr ( " Shows host's CPU utilization. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-01-19 14:01:54 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowGPU , tr ( " Show GPU Usage " ) , tr ( " Unchecked " ) , tr ( " Shows host's GPU utilization. " ) ) ;
2022-12-07 01:26:21 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowGSStats , tr ( " Show Statistics " ) , tr ( " Unchecked " ) ,
tr ( " Shows counters for internal graphical utilization, useful for debugging. " ) ) ;
2023-04-20 07:16:32 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowIndicators , tr ( " Show Indicators " ) , tr ( " Checked " ) ,
2023-03-13 00:34:20 +00:00
tr ( " Shows OSD icon indicators for emulation states such as Pausing, Turbo, Fast-Forward, and Slow-Motion. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-01-14 20:12:07 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowSettings , tr ( " Show Settings " ) , tr ( " Unchecked " ) ,
2023-01-19 14:01:54 +00:00
tr ( " Displays various settings and the current values of those settings, useful for debugging. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-01-14 20:12:07 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowInputs , tr ( " Show Inputs " ) , tr ( " Unchecked " ) ,
2023-09-24 03:56:10 +00:00
tr ( " Shows the current controller state of the system in the bottom-left corner of the display. " ) ) ;
2022-12-07 01:26:21 +00:00
2024-08-05 09:08:30 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowFrameTimes , tr ( " Show Frame Times " ) , tr ( " Unchecked " ) ,
2024-07-19 14:07:36 +00:00
tr ( " Displays a graph showing the average frametimes. " ) ) ;
2024-08-05 09:08:30 +00:00
2024-07-19 14:07:36 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowVersion , tr ( " Show PCSX2 Version " ) , tr ( " Unchecked " ) ,
2024-08-02 13:51:02 +00:00
tr ( " Shows the current PCSX2 version on the top-right corner of the display. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . osdShowVideoCapture , tr ( " Show Video Capture Status " ) , tr ( " Checked " ) ,
tr ( " Shows the currently active video capture status. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . osdShowInputRec , tr ( " Show Input Recording Status " ) , tr ( " Checked " ) ,
tr ( " Shows the currently active input recording status. " ) ) ;
2022-12-07 01:26:21 +00:00
2024-07-20 02:58:31 +00:00
dialog - > registerWidgetHelp ( m_ui . osdShowHardwareInfo , tr ( " Show Hardware Info " ) , tr ( " Unchecked " ) ,
tr ( " Shows the current system hardware information on the OSD. " ) ) ;
2023-01-19 14:01:54 +00:00
dialog - > registerWidgetHelp ( m_ui . warnAboutUnsafeSettings , tr ( " Warn About Unsafe Settings " ) , tr ( " Checked " ) ,
tr ( " Displays warnings when settings are enabled which may break games. " ) ) ;
2022-12-07 01:26:21 +00:00
}
2023-01-12 09:30:39 +00:00
// Recording tab
{
2023-12-30 11:09:16 +00:00
dialog - > registerWidgetHelp ( m_ui . videoCaptureCodec , tr ( " Video Codec " ) , tr ( " Default " ) , tr ( " Selects which Video Codec to be used for Video Capture. "
2024-08-05 09:08:30 +00:00
" <b>If unsure, leave it on default.<b> " ) ) ;
2023-12-30 11:09:16 +00:00
2024-07-20 12:14:28 +00:00
dialog - > registerWidgetHelp ( m_ui . videoCaptureFormat , tr ( " Video Format " ) , tr ( " Default " ) , tr ( " Selects which Video Format to be used for Video Capture. If by chance the codec does not support the format, the first format available will be used. "
2024-08-05 09:08:30 +00:00
" <b>If unsure, leave it on default.<b> " ) ) ;
2024-07-20 12:14:28 +00:00
2024-01-05 13:35:19 +00:00
dialog - > registerWidgetHelp ( m_ui . videoCaptureBitrate , tr ( " Video Bitrate " ) , tr ( " 6000 kbps " ) , tr ( " Sets the video bitrate to be used. "
2024-08-05 09:08:30 +00:00
" Larger bitrate generally yields better video quality at the cost of larger resulting file size. " ) ) ;
2023-12-30 11:09:16 +00:00
dialog - > registerWidgetHelp ( m_ui . videoCaptureResolutionAuto , tr ( " Automatic Resolution " ) , tr ( " Unchecked " ) , tr ( " When checked, the video capture resolution will follows the internal resolution of the running game.<br><br> "
2024-08-05 09:08:30 +00:00
" <b>Be careful when using this setting especially when you are upscaling, as higher internal resolution (above 4x) can results in very large video capture and can cause system overload.</b> " ) ) ;
2023-12-30 11:09:16 +00:00
2023-01-12 09:30:39 +00:00
2023-12-30 11:09:16 +00:00
dialog - > registerWidgetHelp ( m_ui . enableVideoCaptureArguments , tr ( " Enable Extra Video Arguments " ) , tr ( " Unchecked " ) , tr ( " Allows you to pass arguments to the selected video codec. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . videoCaptureArguments , tr ( " Extra Video Arguments " ) , tr ( " Leave It Blank " ) ,
2023-12-31 16:07:18 +00:00
tr ( " Parameters passed to the selected video codec.<br> "
" <b>You must use '=' to separate key from value and ':' to separate two pairs from each other.</b><br> "
2023-01-12 09:30:39 +00:00
" For example: \" crf = 21 : preset = veryfast \" " ) ) ;
2023-12-30 11:09:16 +00:00
dialog - > registerWidgetHelp ( m_ui . audioCaptureCodec , tr ( " Audio Codec " ) , tr ( " Default " ) , tr ( " Selects which Audio Codec to be used for Video Capture. "
2024-08-05 09:08:30 +00:00
" <b>If unsure, leave it on default.<b> " ) ) ;
2023-12-30 11:09:16 +00:00
2024-01-10 00:39:05 +00:00
dialog - > registerWidgetHelp ( m_ui . audioCaptureBitrate , tr ( " Audio Bitrate " ) , tr ( " 160 kbps " ) , tr ( " Sets the audio bitrate to be used. " ) ) ;
2023-12-30 11:09:16 +00:00
dialog - > registerWidgetHelp ( m_ui . enableAudioCaptureArguments , tr ( " Enable Extra Audio Arguments " ) , tr ( " Unchecked " ) , tr ( " Allows you to pass arguments to the selected audio codec. " ) ) ;
dialog - > registerWidgetHelp ( m_ui . audioCaptureArguments , tr ( " Extra Audio Arguments " ) , tr ( " Leave It Blank " ) ,
2023-12-31 16:07:18 +00:00
tr ( " Parameters passed to the selected audio codec.<br> "
" <b>You must use '=' to separate key from value and ':' to separate two pairs from each other.</b><br> "
" For example: \" compression_level = 4 : joint_stereo = 1 \" " ) ) ;
2023-01-12 09:30:39 +00:00
}
2022-06-04 21:35:31 +00:00
// Advanced tab
{
2023-02-18 01:58:32 +00:00
dialog - > registerWidgetHelp ( m_ui . gsDumpCompression , tr ( " GS Dump Compression " ) , tr ( " Zstandard (zst) " ) ,
tr ( " Change the compression algorithm used when creating a GS dump. " ) ) ;
2022-12-07 01:26:21 +00:00
2023-03-18 21:14:55 +00:00
//: Blit = a data operation. You might want to write it as-is, but fully uppercased. More information: https://en.wikipedia.org/wiki/Bit_blit \nSwap chain: see Microsoft's Terminology Portal.
2022-06-04 21:35:31 +00:00
dialog - > registerWidgetHelp ( m_ui . useBlitSwapChain , tr ( " Use Blit Swap Chain " ) , tr ( " Unchecked " ) ,
2023-03-18 21:14:55 +00:00
//: Blit = a data operation. You might want to write it as-is, but fully uppercased. More information: https://en.wikipedia.org/wiki/Bit_blit
2022-06-04 21:35:31 +00:00
tr ( " Uses a blit presentation model instead of flipping when using the Direct3D 11 "
" renderer. This usually results in slower performance, but may be required for some "
" streaming applications, or to uncap framerates on some systems. " ) ) ;
2023-04-29 15:35:04 +00:00
dialog - > registerWidgetHelp ( m_ui . exclusiveFullscreenControl , tr ( " Allow Exclusive Fullscreen " ) , tr ( " Automatic (Default) " ) ,
tr ( " Overrides the driver's heuristics for enabling exclusive fullscreen, or direct flip/scanout.<br> "
" Disallowing exclusive fullscreen may enable smoother task switching and overlays, but increase input latency. " ) ) ;
2022-06-04 21:35:31 +00:00
dialog - > registerWidgetHelp ( m_ui . skipPresentingDuplicateFrames , tr ( " Skip Presenting Duplicate Frames " ) , tr ( " Unchecked " ) ,
2023-01-19 14:01:54 +00:00
tr ( " Detects when idle frames are being presented in 25/30fps games, and skips presenting those frames. The frame is still "
2024-07-13 23:35:27 +00:00
" rendered, it just means the GPU has more time to complete it (this is NOT frame skipping). Can smooth out frame time "
2023-04-29 15:35:04 +00:00
" fluctuations when the CPU/GPU are near maximum utilization, but makes frame pacing more inconsistent and can increase "
" input lag. " ) ) ;
2022-06-04 21:35:31 +00:00
2024-05-26 02:44:16 +00:00
dialog - > registerWidgetHelp ( m_ui . disableMailboxPresentation , tr ( " Disable Mailbox Presentation " ) , tr ( " Unchecked " ) ,
tr ( " Forces the use of FIFO over Mailbox presentation, i.e. double buffering instead of triple buffering. "
" Usually results in worse frame pacing. " ) ) ;
2024-07-04 02:20:23 +00:00
dialog - > registerWidgetHelp ( m_ui . extendedUpscales , tr ( " Extended Upscaling Multipliers " ) , tr ( " Unchecked " ) ,
tr ( " Displays additional, very high upscaling multipliers dependent on GPU capability. " ) ) ;
2023-09-24 03:56:10 +00:00
dialog - > registerWidgetHelp ( m_ui . useDebugDevice , tr ( " Enable Debug Device " ) , tr ( " Unchecked " ) ,
tr ( " Enables API-level validation of graphics commands. " ) ) ;
2022-06-06 11:01:31 +00:00
dialog - > registerWidgetHelp ( m_ui . gsDownloadMode , tr ( " GS Download Mode " ) , tr ( " Accurate " ) ,
2022-06-04 21:35:31 +00:00
tr ( " Skips synchronizing with the GS thread and host GPU for GS downloads. "
" Can result in a large speed boost on slower systems, at the cost of many broken graphical effects. "
" If games are broken and you have this option enabled, please disable it first. " ) ) ;
}
2021-12-13 12:12:54 +00:00
}
GraphicsSettingsWidget : : ~ GraphicsSettingsWidget ( ) = default ;
2022-08-01 23:58:29 +00:00
void GraphicsSettingsWidget : : onTextureFilteringChange ( )
{
const QSignalBlocker block ( m_ui . swTextureFiltering ) ;
m_ui . swTextureFiltering - > setCurrentIndex ( m_ui . textureFiltering - > currentIndex ( ) ) ;
}
void GraphicsSettingsWidget : : onSWTextureFilteringChange ( )
{
const QSignalBlocker block ( m_ui . textureFiltering ) ;
m_ui . textureFiltering - > setCurrentIndex ( m_ui . swTextureFiltering - > currentIndex ( ) ) ;
}
2021-12-13 12:12:54 +00:00
void GraphicsSettingsWidget : : onRendererChanged ( int index )
{
2022-02-15 14:29:18 +00:00
if ( m_dialog - > isPerGameSettings ( ) )
{
if ( index > 0 )
m_dialog - > setIntSettingValue ( " EmuCore/GS " , " Renderer " , static_cast < int > ( s_renderer_info [ index - 1 ] . type ) ) ;
else
m_dialog - > setIntSettingValue ( " EmuCore/GS " , " Renderer " , std : : nullopt ) ;
}
else
{
m_dialog - > setIntSettingValue ( " EmuCore/GS " , " Renderer " , static_cast < int > ( s_renderer_info [ index ] . type ) ) ;
}
2021-12-13 12:12:54 +00:00
g_emu_thread - > applySettings ( ) ;
updateRendererDependentOptions ( ) ;
}
void GraphicsSettingsWidget : : onAdapterChanged ( int index )
{
2022-02-15 14:29:18 +00:00
const int first_adapter = m_dialog - > isPerGameSettings ( ) ? 2 : 1 ;
if ( index > = first_adapter )
2024-06-12 09:56:12 +00:00
m_dialog - > setStringSettingValue ( " EmuCore/GS " , " Adapter " , m_ui . adapterDropdown - > currentText ( ) . toUtf8 ( ) . constData ( ) ) ;
2022-02-15 14:29:18 +00:00
else if ( index > 0 & & m_dialog - > isPerGameSettings ( ) )
m_dialog - > setStringSettingValue ( " EmuCore/GS " , " Adapter " , " " ) ;
2021-12-13 12:12:54 +00:00
else
2022-02-15 14:29:18 +00:00
m_dialog - > setStringSettingValue ( " EmuCore/GS " , " Adapter " , std : : nullopt ) ;
g_emu_thread - > applySettings ( ) ;
}
void GraphicsSettingsWidget : : onFullscreenModeChanged ( int index )
{
const int first_mode = m_dialog - > isPerGameSettings ( ) ? 2 : 1 ;
if ( index > = first_mode )
m_dialog - > setStringSettingValue ( " EmuCore/GS " , " FullscreenMode " , m_ui . fullscreenModes - > currentText ( ) . toUtf8 ( ) . constData ( ) ) ;
else if ( index > 0 & & m_dialog - > isPerGameSettings ( ) )
m_dialog - > setStringSettingValue ( " EmuCore/GS " , " FullscreenMode " , " " ) ;
else
m_dialog - > setStringSettingValue ( " EmuCore/GS " , " FullscreenMode " , std : : nullopt ) ;
2021-12-13 12:12:54 +00:00
g_emu_thread - > applySettings ( ) ;
}
2022-03-26 04:06:40 +00:00
void GraphicsSettingsWidget : : onTrilinearFilteringChanged ( )
{
2023-01-19 14:01:54 +00:00
const bool forced_bilinear = ( m_dialog - > getEffectiveIntValue ( " EmuCore/GS " , " TriFilter " , static_cast < int > ( TriFiltering : : Automatic ) ) > =
static_cast < int > ( TriFiltering : : Forced ) ) ;
2022-03-26 04:06:40 +00:00
m_ui . textureFiltering - > setDisabled ( forced_bilinear ) ;
}
2022-02-15 14:29:18 +00:00
2022-03-26 18:16:25 +00:00
void GraphicsSettingsWidget : : onShadeBoostChanged ( )
{
const bool enabled = m_dialog - > getEffectiveBoolValue ( " EmuCore/GS " , " ShadeBoost " , false ) ;
m_ui . shadeBoostBrightness - > setEnabled ( enabled ) ;
m_ui . shadeBoostContrast - > setEnabled ( enabled ) ;
m_ui . shadeBoostSaturation - > setEnabled ( enabled ) ;
}
2024-07-29 05:43:28 +00:00
void GraphicsSettingsWidget : : onMessagesPosChanged ( )
{
const bool enabled = m_ui . osdMessagesPos - > currentIndex ( ) ! = ( m_dialog - > isPerGameSettings ( ) ? 1 : 0 ) ;
m_ui . warnAboutUnsafeSettings - > setEnabled ( enabled ) ;
}
void GraphicsSettingsWidget : : onPerformancePosChanged ( )
{
const bool enabled = m_ui . osdPerformancePos - > currentIndex ( ) ! = ( m_dialog - > isPerGameSettings ( ) ? 1 : 0 ) ;
2024-08-05 09:08:30 +00:00
2024-10-26 12:37:40 +00:00
m_ui . osdShowVPS - > setEnabled ( enabled ) ;
2024-07-29 05:43:28 +00:00
m_ui . osdShowSpeed - > setEnabled ( enabled ) ;
m_ui . osdShowFPS - > setEnabled ( enabled ) ;
m_ui . osdShowCPU - > setEnabled ( enabled ) ;
m_ui . osdShowGPU - > setEnabled ( enabled ) ;
m_ui . osdShowResolution - > setEnabled ( enabled ) ;
m_ui . osdShowGSStats - > setEnabled ( enabled ) ;
2024-10-26 12:37:40 +00:00
m_ui . osdShowHardwareInfo - > setEnabled ( enabled ) ;
2024-07-29 05:43:28 +00:00
m_ui . osdShowIndicators - > setEnabled ( enabled ) ;
m_ui . osdShowFrameTimes - > setEnabled ( enabled ) ;
m_ui . osdShowVersion - > setEnabled ( enabled ) ;
}
2024-05-17 10:19:53 +00:00
void GraphicsSettingsWidget : : onTextureDumpChanged ( )
{
const bool enabled = m_dialog - > getEffectiveBoolValue ( " EmuCore/GS " , " DumpReplaceableTextures " , false ) ;
m_ui . dumpReplaceableMipmaps - > setEnabled ( enabled ) ;
m_ui . dumpTexturesWithFMVActive - > setEnabled ( enabled ) ;
}
void GraphicsSettingsWidget : : onTextureReplacementChanged ( )
{
const bool enabled = m_dialog - > getEffectiveBoolValue ( " EmuCore/GS " , " LoadTextureReplacements " , false ) ;
m_ui . loadTextureReplacementsAsync - > setEnabled ( enabled ) ;
m_ui . precacheTextureReplacements - > setEnabled ( enabled ) ;
}
2023-01-19 14:01:54 +00:00
void GraphicsSettingsWidget : : onCaptureContainerChanged ( )
2022-12-18 13:05:00 +00:00
{
const std : : string container (
2023-01-19 14:01:54 +00:00
m_dialog - > getEffectiveStringValue ( " EmuCore/GS " , " CaptureContainer " , Pcsx2Config : : GSOptions : : DEFAULT_CAPTURE_CONTAINER ) ) ;
2022-12-18 13:05:00 +00:00
m_ui . videoCaptureCodec - > disconnect ( ) ;
m_ui . videoCaptureCodec - > clear ( ) ;
2023-03-18 21:14:55 +00:00
//: This string refers to a default codec, whether it's an audio codec or a video codec.
2022-12-18 13:05:00 +00:00
m_ui . videoCaptureCodec - > addItem ( tr ( " Default " ) , QString ( ) ) ;
2023-01-19 14:01:54 +00:00
for ( const auto & [ format , name ] : GSCapture : : GetVideoCodecList ( container . c_str ( ) ) )
2022-12-18 13:05:00 +00:00
{
const QString qformat ( QString : : fromStdString ( format ) ) ;
const QString qname ( QString : : fromStdString ( name ) ) ;
m_ui . videoCaptureCodec - > addItem ( QStringLiteral ( " %1 [%2] " ) . arg ( qformat ) . arg ( qname ) , qformat ) ;
}
SettingWidgetBinder : : BindWidgetToStringSetting (
m_dialog - > getSettingsInterface ( ) , m_ui . videoCaptureCodec , " EmuCore/GS " , " VideoCaptureCodec " ) ;
2024-07-20 12:14:28 +00:00
connect ( m_ui . videoCaptureCodec , & QComboBox : : currentIndexChanged , this , & GraphicsSettingsWidget : : onCaptureCodecChanged ) ;
2023-01-19 14:01:54 +00:00
m_ui . audioCaptureCodec - > disconnect ( ) ;
m_ui . audioCaptureCodec - > clear ( ) ;
m_ui . audioCaptureCodec - > addItem ( tr ( " Default " ) , QString ( ) ) ;
for ( const auto & [ format , name ] : GSCapture : : GetAudioCodecList ( container . c_str ( ) ) )
{
const QString qformat ( QString : : fromStdString ( format ) ) ;
const QString qname ( QString : : fromStdString ( name ) ) ;
m_ui . audioCaptureCodec - > addItem ( QStringLiteral ( " %1 [%2] " ) . arg ( qformat ) . arg ( qname ) , qformat ) ;
}
SettingWidgetBinder : : BindWidgetToStringSetting (
m_dialog - > getSettingsInterface ( ) , m_ui . audioCaptureCodec , " EmuCore/GS " , " AudioCaptureCodec " ) ;
}
2024-07-20 12:14:28 +00:00
void GraphicsSettingsWidget : : GraphicsSettingsWidget : : onCaptureCodecChanged ( )
{
m_ui . videoCaptureFormat - > disconnect ( ) ;
m_ui . videoCaptureFormat - > clear ( ) ;
//: This string refers to a default pixel format
m_ui . videoCaptureFormat - > addItem ( tr ( " Default " ) , " " ) ;
const std : : string codec (
m_dialog - > getEffectiveStringValue ( " EmuCore/GS " , " VideoCaptureCodec " , " " ) ) ;
if ( ! codec . empty ( ) )
{
for ( const auto & [ id , name ] : GSCapture : : GetVideoFormatList ( codec . c_str ( ) ) )
{
const QString qid ( QString : : number ( id ) ) ;
const QString qname ( QString : : fromStdString ( name ) ) ;
m_ui . videoCaptureFormat - > addItem ( qname , qid ) ;
}
}
SettingWidgetBinder : : BindWidgetToStringSetting (
m_dialog - > getSettingsInterface ( ) , m_ui . videoCaptureFormat , " EmuCore/GS " , " VideoCaptureFormat " ) ;
}
2023-01-19 14:01:54 +00:00
void GraphicsSettingsWidget : : onEnableVideoCaptureChanged ( )
{
const bool enabled = m_dialog - > getEffectiveBoolValue ( " EmuCore/GS " , " EnableVideoCapture " , true ) ;
m_ui . videoCaptureOptions - > setEnabled ( enabled ) ;
2022-12-18 13:05:00 +00:00
}
2023-01-12 09:30:39 +00:00
void GraphicsSettingsWidget : : onEnableVideoCaptureArgumentsChanged ( )
{
const bool enabled = m_dialog - > getEffectiveBoolValue ( " EmuCore/GS " , " EnableVideoCaptureParameters " , false ) ;
m_ui . videoCaptureArguments - > setEnabled ( enabled ) ;
}
2023-01-19 14:01:54 +00:00
void GraphicsSettingsWidget : : onVideoCaptureAutoResolutionChanged ( )
{
const bool enabled = ! m_dialog - > getEffectiveBoolValue ( " EmuCore/GS " , " VideoCaptureAutoResolution " , true ) ;
m_ui . videoCaptureWidth - > setEnabled ( enabled ) ;
m_ui . videoCaptureHeight - > setEnabled ( enabled ) ;
}
void GraphicsSettingsWidget : : onEnableAudioCaptureChanged ( )
{
const bool enabled = m_dialog - > getEffectiveBoolValue ( " EmuCore/GS " , " EnableAudioCapture " , true ) ;
m_ui . audioCaptureOptions - > setEnabled ( enabled ) ;
}
void GraphicsSettingsWidget : : onEnableAudioCaptureArgumentsChanged ( )
{
const bool enabled = m_dialog - > getEffectiveBoolValue ( " EmuCore/GS " , " EnableAudioCaptureParameters " , false ) ;
m_ui . audioCaptureArguments - > setEnabled ( enabled ) ;
}
2022-03-24 00:58:29 +00:00
void GraphicsSettingsWidget : : onGpuPaletteConversionChanged ( int state )
{
2023-02-24 14:06:53 +00:00
const bool disabled =
state = = Qt : : CheckState : : PartiallyChecked ? Host : : GetBaseBoolSettingValue ( " EmuCore/GS " , " paltex " , false ) : ( state ! = 0 ) ;
m_ui . anisotropicFiltering - > setDisabled ( disabled ) ;
}
2023-03-19 12:24:29 +00:00
void GraphicsSettingsWidget : : onCPUSpriteRenderBWChanged ( )
{
const int value = m_dialog - > getEffectiveIntValue ( " EmuCore/GS " , " UserHacks_CPUSpriteRenderBW " , 0 ) ;
m_ui . cpuSpriteRenderLevel - > setEnabled ( value ! = 0 ) ;
}
2022-02-15 14:29:18 +00:00
GSRendererType GraphicsSettingsWidget : : getEffectiveRenderer ( ) const
{
const GSRendererType type =
static_cast < GSRendererType > ( m_dialog - > getEffectiveIntValue ( " EmuCore/GS " , " Renderer " , static_cast < int > ( GSRendererType : : Auto ) ) ) ;
return ( type = = GSRendererType : : Auto ) ? GSUtil : : GetPreferredRenderer ( ) : type ;
}
2021-12-13 12:12:54 +00:00
void GraphicsSettingsWidget : : updateRendererDependentOptions ( )
{
2022-02-15 14:29:18 +00:00
const GSRendererType type = getEffectiveRenderer ( ) ;
2021-12-13 12:12:54 +00:00
# ifdef _WIN32
const bool is_dx11 = ( type = = GSRendererType : : DX11 | | type = = GSRendererType : : SW ) ;
2022-04-18 20:21:22 +00:00
const bool is_sw_dx = ( type = = GSRendererType : : DX11 | | type = = GSRendererType : : DX12 | | type = = GSRendererType : : SW ) ;
2021-12-13 12:12:54 +00:00
# else
const bool is_dx11 = false ;
2022-04-18 20:21:22 +00:00
const bool is_sw_dx = false ;
2021-12-13 12:12:54 +00:00
# endif
2023-01-19 14:01:54 +00:00
const bool is_hardware = ( type = = GSRendererType : : DX11 | | type = = GSRendererType : : DX12 | | type = = GSRendererType : : OGL | |
type = = GSRendererType : : VK | | type = = GSRendererType : : Metal ) ;
2021-12-13 12:12:54 +00:00
const bool is_software = ( type = = GSRendererType : : SW ) ;
2023-04-29 15:35:04 +00:00
const bool is_auto = ( type = = GSRendererType : : Auto ) ;
const bool is_vk = ( type = = GSRendererType : : VK ) ;
2024-03-14 17:43:07 +00:00
const bool is_disable_barriers = ( type = = GSRendererType : : DX11 | | type = = GSRendererType : : DX12 | | type = = GSRendererType : : Metal | | type = = GSRendererType : : SW ) ;
2023-03-12 15:09:56 +00:00
const bool hw_fixes = ( is_hardware & & m_ui . enableHWFixes & & m_ui . enableHWFixes - > checkState ( ) = = Qt : : Checked ) ;
2022-11-21 09:01:14 +00:00
const int prev_tab = m_ui . tabs - > currentIndex ( ) ;
2021-12-13 12:12:54 +00:00
2022-12-11 14:16:54 +00:00
// hw rendering
m_ui . tabs - > setTabEnabled ( 1 , is_hardware ) ;
m_ui . tabs - > setTabVisible ( 1 , is_hardware ) ;
// sw rendering
m_ui . tabs - > setTabEnabled ( 2 , is_software ) ;
m_ui . tabs - > setTabVisible ( 2 , is_software ) ;
// hardware fixes
m_ui . tabs - > setTabEnabled ( 3 , hw_fixes ) ;
m_ui . tabs - > setTabVisible ( 3 , hw_fixes ) ;
// upscaling fixes
m_ui . tabs - > setTabEnabled ( 4 , hw_fixes ) ;
m_ui . tabs - > setTabVisible ( 4 , hw_fixes ) ;
// texture replacement
m_ui . tabs - > setTabEnabled ( 5 , is_hardware ) ;
m_ui . tabs - > setTabVisible ( 5 , is_hardware ) ;
2021-12-13 12:12:54 +00:00
2022-11-21 09:01:14 +00:00
// move back to the renderer if we're on one of the now-hidden tabs
if ( is_software & & ( prev_tab = = 1 | | ( prev_tab > = 2 & & prev_tab < = 5 ) ) )
m_ui . tabs - > setCurrentIndex ( 2 ) ;
else if ( is_hardware & & prev_tab = = 2 )
m_ui . tabs - > setCurrentIndex ( 1 ) ;
2021-12-13 12:12:54 +00:00
2023-12-25 14:29:57 +00:00
if ( m_ui . useBlitSwapChain )
m_ui . useBlitSwapChain - > setEnabled ( is_dx11 ) ;
2023-03-08 12:56:30 +00:00
2023-12-25 14:29:57 +00:00
if ( m_ui . overrideTextureBarriers )
2024-03-14 17:43:07 +00:00
m_ui . overrideTextureBarriers - > setDisabled ( is_disable_barriers ) ;
2022-04-18 20:21:22 +00:00
2023-12-25 14:29:57 +00:00
if ( m_ui . disableFramebufferFetch )
m_ui . disableFramebufferFetch - > setDisabled ( is_sw_dx ) ;
2021-12-13 12:12:54 +00:00
2023-05-03 15:25:03 +00:00
if ( m_ui . exclusiveFullscreenControl )
m_ui . exclusiveFullscreenControl - > setEnabled ( is_auto | | is_vk ) ;
2023-04-29 15:35:04 +00:00
2021-12-13 12:12:54 +00:00
// populate adapters
2024-06-30 14:21:03 +00:00
std : : vector < GSAdapterInfo > adapters = GSGetAdapterInfo ( type ) ;
const GSAdapterInfo * current_adapter_info = nullptr ;
2024-08-05 09:08:30 +00:00
2021-12-13 12:12:54 +00:00
// fill+select adapters
{
2024-06-12 09:56:12 +00:00
QSignalBlocker sb ( m_ui . adapterDropdown ) ;
2022-02-15 14:29:18 +00:00
2022-05-24 12:37:44 +00:00
std : : string current_adapter = Host : : GetBaseStringSettingValue ( " EmuCore/GS " , " Adapter " , " " ) ;
2024-06-12 09:56:12 +00:00
m_ui . adapterDropdown - > clear ( ) ;
m_ui . adapterDropdown - > setEnabled ( ! adapters . empty ( ) ) ;
2024-10-22 00:24:31 +00:00
m_ui . adapterDropdown - > addItem ( GetDefaultAdapter ( ) . c_str ( ) ) ;
2024-06-12 09:56:12 +00:00
m_ui . adapterDropdown - > setCurrentIndex ( 0 ) ;
2022-02-15 14:29:18 +00:00
if ( m_dialog - > isPerGameSettings ( ) )
{
2024-06-12 09:56:12 +00:00
m_ui . adapterDropdown - > insertItem (
2024-10-22 00:24:31 +00:00
0 , tr ( " Use Global Setting [%1] " ) . arg ( current_adapter . empty ( ) ? GetDefaultAdapter ( ) . c_str ( ) : QString : : fromStdString ( current_adapter ) ) ) ;
2022-02-15 14:29:18 +00:00
if ( ! m_dialog - > getSettingsInterface ( ) - > GetStringValue ( " EmuCore/GS " , " Adapter " , & current_adapter ) )
{
// clear the adapter so we don't set it to the global value
current_adapter . clear ( ) ;
2024-06-12 09:56:12 +00:00
m_ui . adapterDropdown - > setCurrentIndex ( 0 ) ;
2022-02-15 14:29:18 +00:00
}
}
2024-06-30 14:21:03 +00:00
for ( const GSAdapterInfo & adapter : adapters )
2021-12-13 12:12:54 +00:00
{
2024-06-30 14:21:03 +00:00
m_ui . adapterDropdown - > addItem ( QString : : fromStdString ( adapter . name ) ) ;
if ( current_adapter = = adapter . name )
{
2024-06-12 09:56:12 +00:00
m_ui . adapterDropdown - > setCurrentIndex ( m_ui . adapterDropdown - > count ( ) - 1 ) ;
2024-06-30 14:21:03 +00:00
current_adapter_info = & adapter ;
}
2021-12-13 12:12:54 +00:00
}
2024-06-30 14:21:03 +00:00
current_adapter_info = ( current_adapter_info | | adapters . empty ( ) ) ? current_adapter_info : & adapters . front ( ) ;
2021-12-13 12:12:54 +00:00
}
// fill+select fullscreen modes
{
QSignalBlocker sb ( m_ui . fullscreenModes ) ;
2022-05-24 12:37:44 +00:00
std : : string current_mode ( Host : : GetBaseStringSettingValue ( " EmuCore/GS " , " FullscreenMode " , " " ) ) ;
2021-12-13 12:12:54 +00:00
m_ui . fullscreenModes - > clear ( ) ;
m_ui . fullscreenModes - > addItem ( tr ( " Borderless Fullscreen " ) ) ;
2022-02-15 14:29:18 +00:00
m_ui . fullscreenModes - > setCurrentIndex ( 0 ) ;
if ( m_dialog - > isPerGameSettings ( ) )
{
m_ui . fullscreenModes - > insertItem (
2023-09-09 05:12:46 +00:00
0 , tr ( " Use Global Setting [%1] " ) . arg ( current_mode . empty ( ) ? tr ( " Borderless Fullscreen " ) : QString : : fromStdString ( current_mode ) ) ) ;
2022-02-15 14:29:18 +00:00
if ( ! m_dialog - > getSettingsInterface ( ) - > GetStringValue ( " EmuCore/GS " , " FullscreenMode " , & current_mode ) )
{
current_mode . clear ( ) ;
m_ui . fullscreenModes - > setCurrentIndex ( 0 ) ;
}
}
2021-12-13 12:12:54 +00:00
2024-06-30 14:21:03 +00:00
if ( current_adapter_info )
2021-12-13 12:12:54 +00:00
{
2024-06-30 14:21:03 +00:00
for ( const std : : string & fs_mode : current_adapter_info - > fullscreen_modes )
{
m_ui . fullscreenModes - > addItem ( QString : : fromStdString ( fs_mode ) ) ;
if ( current_mode = = fs_mode )
m_ui . fullscreenModes - > setCurrentIndex ( m_ui . fullscreenModes - > count ( ) - 1 ) ;
}
2021-12-13 12:12:54 +00:00
}
}
2024-06-30 14:21:03 +00:00
// assume the GPU can do 10K textures.
const u32 max_upscale_multiplier = std : : max ( current_adapter_info ? current_adapter_info - > max_upscale_multiplier : 0u , 10u ) ;
populateUpscaleMultipliers ( max_upscale_multiplier ) ;
}
void GraphicsSettingsWidget : : populateUpscaleMultipliers ( u32 max_upscale_multiplier )
{
static constexpr std : : pair < const char * , float > templates [ ] = {
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " Native (PS2) (Default) " ) , 1.0f } ,
2024-07-04 02:20:23 +00:00
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 1.25x Native (~450px) " ) , 1.25f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 1.5x Native (~540px) " ) , 1.5f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 1.75x Native (~630px) " ) , 1.75f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 2x Native (~720px/HD) " ) , 2.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 2.5x Native (~900px/HD+) " ) , 2.5f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 3x Native (~1080px/FHD) " ) , 3.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 3.5x Native (~1260px) " ) , 3.5f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 4x Native (~1440px/QHD) " ) , 4.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 5x Native (~1800px/QHD+) " ) , 5.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 6x Native (~2160px/4K UHD) " ) , 6.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 7x Native (~2520px) " ) , 7.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 8x Native (~2880px/5K UHD) " ) , 8.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 9x Native (~3240px) " ) , 9.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 10x Native (~3600px/6K UHD) " ) , 10.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 11x Native (~3960px) " ) , 11.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 12x Native (~4320px/8K UHD) " ) , 12.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 13x Native (~4680px) " ) , 13.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 14x Native (~5040px) " ) , 14.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 15x Native (~5400px) " ) , 15.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 16x Native (~5760px) " ) , 16.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 17x Native (~6120px) " ) , 17.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 18x Native (~6480px/12K UHD) " ) , 18.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 19x Native (~6840px) " ) , 19.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 20x Native (~7200px) " ) , 20.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 21x Native (~7560px) " ) , 21.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 22x Native (~7920px) " ) , 22.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 23x Native (~8280px) " ) , 23.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 24x Native (~8640px/16K UHD) " ) , 24.0f } ,
{ QT_TRANSLATE_NOOP ( " GraphicsSettingsWidget " , " 25x Native (~9000px) " ) , 25.0f } ,
2024-06-30 14:21:03 +00:00
} ;
2024-07-04 02:20:23 +00:00
static constexpr u32 max_template_multiplier = 25 ;
2024-06-30 14:21:03 +00:00
// Limit the dropdown to 12x if we're not showing advanced settings. Save the noobs.
static constexpr u32 max_non_advanced_multiplier = 12 ;
QSignalBlocker sb ( m_ui . upscaleMultiplier ) ;
m_ui . upscaleMultiplier - > clear ( ) ;
2024-07-04 02:20:23 +00:00
const u32 max_shown_multiplier = m_ui . extendedUpscales & & m_ui . extendedUpscales - > checkState ( ) = = Qt : : Checked ?
max_upscale_multiplier :
std : : min ( max_upscale_multiplier , max_non_advanced_multiplier ) ;
2024-06-30 14:21:03 +00:00
for ( const auto & [ name , value ] : templates )
{
2024-07-04 02:20:23 +00:00
if ( value > max_shown_multiplier )
break ;
2024-06-30 14:21:03 +00:00
m_ui . upscaleMultiplier - > addItem ( tr ( name ) , QVariant ( value ) ) ;
}
for ( u32 i = max_template_multiplier + 1 ; i < = max_shown_multiplier ; i + + )
2024-07-02 14:50:49 +00:00
m_ui . upscaleMultiplier - > addItem ( tr ( " %1x Native " ) . arg ( i ) , QVariant ( static_cast < float > ( i ) ) ) ;
2024-06-30 14:21:03 +00:00
const float global_value = Host : : GetBaseFloatSettingValue ( " EmuCore/GS " , " upscale_multiplier " , 1.0f ) ;
if ( m_dialog - > isPerGameSettings ( ) )
{
2024-07-02 14:50:49 +00:00
const int name_idx = m_ui . upscaleMultiplier - > findData ( QVariant ( global_value ) ) ;
const QString global_name = ( name_idx > = 0 ) ? m_ui . upscaleMultiplier - > itemText ( name_idx ) : tr ( " %1x Native " ) ;
m_ui . upscaleMultiplier - > insertItem ( 0 , tr ( " Use Global Setting [%1] " ) . arg ( global_name ) ) ;
2024-06-30 14:21:03 +00:00
const std : : optional < float > config_value = m_dialog - > getFloatValue ( " EmuCore/GS " , " upscale_multiplier " , std : : nullopt ) ;
if ( config_value . has_value ( ) )
{
if ( int index = m_ui . upscaleMultiplier - > findData ( QVariant ( config_value . value ( ) ) ) ; index > 0 )
m_ui . upscaleMultiplier - > setCurrentIndex ( index ) ;
}
else
{
m_ui . upscaleMultiplier - > setCurrentIndex ( 0 ) ;
2024-08-05 09:08:30 +00:00
}
2024-06-30 14:21:03 +00:00
}
else
{
if ( int index = m_ui . upscaleMultiplier - > findData ( QVariant ( global_value ) ) ; index > 0 )
m_ui . upscaleMultiplier - > setCurrentIndex ( index ) ;
}
}
void GraphicsSettingsWidget : : onUpscaleMultiplierChanged ( )
{
const QVariant data = m_ui . upscaleMultiplier - > currentData ( ) ;
m_dialog - > setFloatSettingValue ( " EmuCore/GS " , " upscale_multiplier " ,
data . isValid ( ) ? std : : optional < float > ( data . toFloat ( ) ) : std : : optional < float > ( ) ) ;
2021-12-13 12:12:54 +00:00
}
2023-03-12 13:44:53 +00:00
void GraphicsSettingsWidget : : resetManualHardwareFixes ( )
{
bool changed = false ;
{
auto lock = Host : : GetSettingsLock ( ) ;
SettingsInterface * const si = Host : : Internal : : GetBaseSettingsLayer ( ) ;
auto check_bool = [ & ] ( const char * section , const char * key , bool expected ) {
if ( si - > GetBoolValue ( section , key , expected ) ! = expected )
{
si - > SetBoolValue ( section , key , expected ) ;
changed = true ;
}
} ;
auto check_int = [ & ] ( const char * section , const char * key , s32 expected ) {
if ( si - > GetIntValue ( section , key , expected ) ! = expected )
{
si - > SetIntValue ( section , key , expected ) ;
changed = true ;
}
} ;
check_bool ( " EmuCore/GS " , " UserHacks " , false ) ;
check_int ( " EmuCore/GS " , " UserHacks_CPUSpriteRenderBW " , 0 ) ;
check_int ( " EmuCore/GS " , " UserHacks_CPUCLUTRender " , 0 ) ;
check_int ( " EmuCore/GS " , " UserHacks_GPUTargetCLUTMode " , 0 ) ;
check_int ( " EmuCore/GS " , " UserHacks_SkipDraw_Start " , 0 ) ;
check_int ( " EmuCore/GS " , " UserHacks_SkipDraw_End " , 0 ) ;
check_bool ( " EmuCore/GS " , " UserHacks_AutoFlush " , false ) ;
check_bool ( " EmuCore/GS " , " UserHacks_CPU_FB_Conversion " , false ) ;
check_bool ( " EmuCore/GS " , " UserHacks_DisableDepthSupport " , false ) ;
check_bool ( " EmuCore/GS " , " UserHacks_Disable_Safe_Features " , false ) ;
2023-05-11 10:41:26 +00:00
check_bool ( " EmuCore/GS " , " UserHacks_DisableRenderFixes " , false ) ;
2023-03-12 13:44:53 +00:00
check_bool ( " EmuCore/GS " , " preload_frame_with_gs_data " , false ) ;
check_bool ( " EmuCore/GS " , " UserHacks_DisablePartialInvalidation " , false ) ;
check_int ( " EmuCore/GS " , " UserHacks_TextureInsideRt " , static_cast < int > ( GSTextureInRtMode : : Disabled ) ) ;
check_bool ( " EmuCore/GS " , " UserHacks_ReadTCOnClose " , false ) ;
check_bool ( " EmuCore/GS " , " UserHacks_EstimateTextureRegion " , false ) ;
check_bool ( " EmuCore/GS " , " paltex " , false ) ;
check_int ( " EmuCore/GS " , " UserHacks_HalfPixelOffset " , 0 ) ;
2024-06-06 15:45:20 +00:00
check_int ( " EmuCore/GS " , " UserHacks_native_scaling " , static_cast < int > ( GSNativeScaling : : Off ) ) ;
2023-03-12 13:44:53 +00:00
check_int ( " EmuCore/GS " , " UserHacks_round_sprite_offset " , 0 ) ;
check_int ( " EmuCore/GS " , " UserHacks_TCOffsetX " , 0 ) ;
check_int ( " EmuCore/GS " , " UserHacks_TCOffsetY " , 0 ) ;
check_bool ( " EmuCore/GS " , " UserHacks_align_sprite_X " , false ) ;
check_bool ( " EmuCore/GS " , " UserHacks_merge_pp_sprite " , false ) ;
2024-06-08 20:08:01 +00:00
check_bool ( " EmuCore/GS " , " UserHacks_ForceEvenSpritePosition " , false ) ;
2023-03-16 02:50:59 +00:00
check_bool ( " EmuCore/GS " , " UserHacks_BilinearHack " , false ) ;
2023-03-12 13:44:53 +00:00
}
if ( changed )
Host : : CommitBaseSettingChanges ( ) ;
}