Skip to content

Commit 89d4fc7

Browse files
committed
libretro: add graphics mod option
1 parent 2ce4b65 commit 89d4fc7

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

Source/Core/DolphinLibretro/Boot.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,9 @@ bool retro_load_game(const struct retro_game_info* game)
469469
if (Common::is_uwp())
470470
Config::SetBase(Config::GFX_SHADER_CACHE, false);
471471

472+
Config::SetBase(Config::GFX_MODS_ENABLE,
473+
Libretro::GetOption<bool>(gfx_settings::MODS_ENABLE, /*def=*/false));
474+
472475
// Graphics.Enhancements
473476
Config::SetBase(Config::GFX_ENHANCE_FORCE_TEXTURE_FILTERING,
474477
static_cast<TextureFilteringMode>(

Source/Core/DolphinLibretro/Common/Options.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,20 @@ static struct retro_core_option_v2_definition option_defs[] = {
10301030
},
10311031
"disabled"
10321032
},
1033+
{
1034+
Libretro::Options::gfx_settings::MODS_ENABLE,
1035+
"Graphics > Settings > Enable Mods",
1036+
"Enable Mods",
1037+
"Loads graphic mods from User/Load/GraphicsMods.",
1038+
nullptr,
1039+
CATEGORY_GFX_SETTINGS,
1040+
{
1041+
{ "disabled", nullptr },
1042+
{ "enabled", nullptr },
1043+
{ nullptr, nullptr }
1044+
},
1045+
"disabled"
1046+
},
10331047

10341048
// ========== Graphics.Enhancements ==========
10351049
{

Source/Core/DolphinLibretro/Common/Options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ namespace gfx_settings {
233233
constexpr const char ENABLE_PIXEL_LIGHTING[] = "dolphin_pixel_lighting";
234234
constexpr const char FAST_DEPTH_CALCULATION[] = "dolphin_fast_depth_calculation";
235235
constexpr const char DISABLE_FOG[] = "dolphin_disable_fog";
236+
constexpr const char MODS_ENABLE[] = "dolphin_mods_enabled";
236237
} // namespace gfx_settings
237238

238239
// ======================================================

0 commit comments

Comments
 (0)