Skip to content

Commit

Permalink
Core / DolphinQt / VideoCommon: add setting for enabling graphic mods
Browse files Browse the repository at this point in the history
  • Loading branch information
iwubcode committed Jun 27, 2022
1 parent f416b71 commit 0f88155
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Source/Core/Core/Config/GraphicsSettings.cpp
Expand Up @@ -101,6 +101,8 @@ const Info<int> GFX_SW_DRAW_END{{System::GFX, "Settings", "SWDrawEnd"}, 100000};

const Info<bool> GFX_PREFER_GLES{{System::GFX, "Settings", "PreferGLES"}, false};

const Info<bool> GFX_MODS_ENABLE{{System::GFX, "Settings", "EnableMods"}, false};

// Graphics.Enhancements

const Info<bool> GFX_ENHANCE_FORCE_FILTERING{{System::GFX, "Enhancements", "ForceFiltering"},
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/Config/GraphicsSettings.h
Expand Up @@ -82,6 +82,8 @@ extern const Info<int> GFX_SW_DRAW_END;

extern const Info<bool> GFX_PREFER_GLES;

extern const Info<bool> GFX_MODS_ENABLE;

// Graphics.Enhancements

extern const Info<bool> GFX_ENHANCE_FORCE_FILTERING;
Expand Down
8 changes: 7 additions & 1 deletion Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp
Expand Up @@ -72,13 +72,15 @@ void AdvancedWidget::CreateWidgets()
m_dump_xfb_target = new GraphicsBool(tr("Dump XFB Target"), Config::GFX_DUMP_XFB_TARGET);
m_disable_vram_copies =
new GraphicsBool(tr("Disable EFB VRAM Copies"), Config::GFX_HACK_DISABLE_COPY_TO_VRAM);
m_enable_graphics_mods = new GraphicsBool(tr("Enable Graphics Mods"), Config::GFX_MODS_ENABLE);

utility_layout->addWidget(m_load_custom_textures, 0, 0);
utility_layout->addWidget(m_prefetch_custom_textures, 0, 1);

utility_layout->addWidget(m_disable_vram_copies, 1, 0);
utility_layout->addWidget(m_enable_graphics_mods, 1, 1);

utility_layout->addWidget(m_dump_efb_target, 1, 1);
utility_layout->addWidget(m_dump_efb_target, 2, 0);
utility_layout->addWidget(m_dump_xfb_target, 2, 1);

// Texture dumping
Expand Down Expand Up @@ -245,6 +247,9 @@ void AdvancedWidget::AddDescriptions()
QT_TR_NOOP("Disables the VRAM copy of the EFB, forcing a round-trip to RAM. Inhibits all "
"upscaling.<br><br><dolphin_emphasis>If unsure, leave this "
"unchecked.</dolphin_emphasis>");
static const char TR_LOAD_GRAPHICS_MODS_DESCRIPTION[] =
QT_TR_NOOP("Loads graphics mods from User/Load/GraphicsMods/.<br><br><dolphin_emphasis>If "
"unsure, leave this unchecked.</dolphin_emphasis>");
static const char TR_INTERNAL_RESOLUTION_FRAME_DUMPING_DESCRIPTION[] = QT_TR_NOOP(
"Creates frame dumps and screenshots at the internal resolution of the renderer, rather than "
"the size of the window it is displayed within.<br><br>If the aspect ratio is widescreen, "
Expand Down Expand Up @@ -316,6 +321,7 @@ void AdvancedWidget::AddDescriptions()
m_dump_efb_target->SetDescription(tr(TR_DUMP_EFB_DESCRIPTION));
m_dump_xfb_target->SetDescription(tr(TR_DUMP_XFB_DESCRIPTION));
m_disable_vram_copies->SetDescription(tr(TR_DISABLE_VRAM_COPIES_DESCRIPTION));
m_enable_graphics_mods->SetDescription(tr(TR_LOAD_GRAPHICS_MODS_DESCRIPTION));
m_use_fullres_framedumps->SetDescription(tr(TR_INTERNAL_RESOLUTION_FRAME_DUMPING_DESCRIPTION));
#ifdef HAVE_FFMPEG
m_dump_use_ffv1->SetDescription(tr(TR_USE_FFV1_DESCRIPTION));
Expand Down
1 change: 1 addition & 0 deletions Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h
Expand Up @@ -42,6 +42,7 @@ class AdvancedWidget final : public GraphicsWidget
GraphicsBool* m_dump_xfb_target;
GraphicsBool* m_disable_vram_copies;
GraphicsBool* m_load_custom_textures;
GraphicsBool* m_enable_graphics_mods;

// Texture dumping
GraphicsBool* m_dump_textures;
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/VideoCommon/VideoConfig.cpp
Expand Up @@ -145,6 +145,8 @@ void VideoConfig::Refresh()
bFastTextureSampling = Config::Get(Config::GFX_HACK_FAST_TEXTURE_SAMPLING);

bPerfQueriesEnable = Config::Get(Config::GFX_PERF_QUERIES_ENABLE);

bGraphicMods = Config::Get(Config::GFX_MODS_ENABLE);
}

void VideoConfig::VerifyValidity()
Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoCommon/VideoConfig.h
Expand Up @@ -111,6 +111,7 @@ struct VideoConfig final
bool bBorderlessFullscreen = false;
bool bEnableGPUTextureDecoding = false;
int iBitrateKbps = 0;
bool bGraphicMods = false;

// Hacks
bool bEFBAccessEnable = false;
Expand Down

0 comments on commit 0f88155

Please sign in to comment.