Skip to content

Commit

Permalink
Merge pull request #17488 from bslenul/vk-gl-only-opts
Browse files Browse the repository at this point in the history
[Libretro] Show/hide some options depending on the renderer + remove MSAA option
  • Loading branch information
hrydgard committed May 21, 2023
2 parents 30b11e8 + 085027b commit d5dfef8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions libretro/libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ static void check_variables(CoreParameter &coreParam)
g_Config.iInternalResolution = 10;
}

#if 0 // see issue #16786
var.key = "ppsspp_mulitsample_level";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
Expand All @@ -617,6 +618,7 @@ static void check_variables(CoreParameter &coreParam)
else if (!strcmp(var.value, "x8"))
g_Config.iMultiSampleLevel = 3;
}
#endif

var.key = "ppsspp_skip_buffer_effects";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
Expand Down Expand Up @@ -1015,13 +1017,15 @@ static void check_variables(CoreParameter &coreParam)
}
}

#if 0 // see issue #16786
if (g_Config.iMultiSampleLevel != iMultiSampleLevel_prev && PSP_IsInited())
{
if (gpu)
{
gpu->NotifyRenderResized();
}
}
#endif

if (updateAvInfo)
{
Expand Down Expand Up @@ -1293,6 +1297,23 @@ bool retro_load_game(const struct retro_game_info *game)
return false;
}

struct retro_core_option_display option_display;

// Show/hide 'MSAA' and 'Texture Shader' options, Vulkan only
option_display.visible = (g_Config.iGPUBackend == (int)GPUBackend::VULKAN) ? true : false;
#if 0 // see issue #16786
option_display.key = "ppsspp_mulitsample_level";
environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY, &option_display);
#endif
option_display.key = "ppsspp_texture_shader";
environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY, &option_display);

// Show/hide 'Buffered Frames' option, Vulkan/GL only
option_display.visible = (g_Config.iGPUBackend == (int)GPUBackend::VULKAN ||
g_Config.iGPUBackend == (int)GPUBackend::OPENGL) ? true : false;
option_display.key = "ppsspp_inflight_frames";
environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY, &option_display);

set_variable_visibility();

return true;
Expand Down
2 changes: 2 additions & 0 deletions libretro/libretro_core_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ struct retro_core_option_v2_definition option_defs_us[] = {
},
"480x272"
},
#if 0 // see issue #16786
{
"ppsspp_mulitsample_level",
"MSAA Antialiasing (Vulkan Only)",
Expand All @@ -309,6 +310,7 @@ struct retro_core_option_v2_definition option_defs_us[] = {
},
"Disabled"
},
#endif
{
"ppsspp_skip_buffer_effects",
"Skip Buffer Effects",
Expand Down

0 comments on commit d5dfef8

Please sign in to comment.