Merge pull request #16519 from stuken/libretro_msaa_option

Expose MSAA option for libretro.
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2022-12-07 12:43:29 +01:00
commit bafe14e9ee
2 files changed
+40

No files matched your search

+24
View File
@@ -597,6 +597,7 @@ static void check_variables(CoreParameter &coreParam)
int iInternalResolution_prev;
int iTexScalingType_prev;
int iTexScalingLevel_prev;
int iMultiSampleLevel_prev;
var.key = "ppsspp_language";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
@@ -745,6 +746,21 @@ static void check_variables(CoreParameter &coreParam)
g_Config.iInternalResolution = 10;
}
var.key = "ppsspp_mulitsample_level";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
iMultiSampleLevel_prev = g_Config.iMultiSampleLevel;
if (!strcmp(var.value, "Disabled"))
g_Config.iMultiSampleLevel = 0;
else if (!strcmp(var.value, "x2"))
g_Config.iMultiSampleLevel = 1;
else if (!strcmp(var.value, "x4"))
g_Config.iMultiSampleLevel = 2;
else if (!strcmp(var.value, "x8"))
g_Config.iMultiSampleLevel = 3;
}
var.key = "ppsspp_skip_buffer_effects";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
{
@@ -1134,6 +1150,14 @@ static void check_variables(CoreParameter &coreParam)
}
}
if (g_Config.iMultiSampleLevel != iMultiSampleLevel_prev && PSP_IsInited())
{
if (gpu)
{
gpu->NotifyRenderResized();
}
}
if (updateAvInfo)
{
retro_system_av_info avInfo;
+16
View File
@@ -283,6 +283,22 @@ struct retro_core_option_v2_definition option_defs_us[] = {
},
"480x272"
},
{
"ppsspp_mulitsample_level",
"MSAA Antialiasing (Vulkan Only)",
NULL,
NULL,
NULL,
"video",
{
{"Disabled", NULL},
{"x2", NULL},
{"x4", NULL},
{"x8", NULL},
{NULL, NULL}
},
"Disabled"
},
{
"ppsspp_skip_buffer_effects",
"Skip Buffer Effects",