mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 02:30:35 +00:00
Only show Menu Linear Filter for RGUI and only show it for
video drivers that implement it
This commit is contained in:
parent
c506f489df
commit
6b31bd8b48
@ -1583,8 +1583,17 @@ d3d10_get_hw_render_interface(void* data, const struct retro_hw_render_interface
|
||||
}
|
||||
#endif
|
||||
|
||||
static uint32_t d3d10_get_flags(void *data)
|
||||
{
|
||||
uint32_t flags = 0;
|
||||
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_MENU_FRAME_FILTERING);
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static const video_poke_interface_t d3d10_poke_interface = {
|
||||
NULL, /* get_flags */
|
||||
d3d10_get_flags,
|
||||
NULL, /* set_coords */
|
||||
NULL, /* set_mvp */
|
||||
d3d10_gfx_load_texture,
|
||||
|
@ -1604,8 +1604,17 @@ d3d11_get_hw_render_interface(void* data, const struct retro_hw_render_interface
|
||||
return d3d11->hw.enable;
|
||||
}
|
||||
|
||||
static uint32_t d3d11_get_flags(void *data)
|
||||
{
|
||||
uint32_t flags = 0;
|
||||
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_MENU_FRAME_FILTERING);
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static const video_poke_interface_t d3d11_poke_interface = {
|
||||
NULL, /* get_flags */
|
||||
d3d11_get_flags,
|
||||
NULL, /* set_coords */
|
||||
NULL, /* set_mvp */
|
||||
d3d11_gfx_load_texture,
|
||||
|
@ -1750,8 +1750,17 @@ static void d3d12_gfx_unload_texture(void* data, uintptr_t handle)
|
||||
free(texture);
|
||||
}
|
||||
|
||||
static uint32_t d3d12_get_flags(void *data)
|
||||
{
|
||||
uint32_t flags = 0;
|
||||
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_MENU_FRAME_FILTERING);
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static const video_poke_interface_t d3d12_poke_interface = {
|
||||
NULL, /* get_flags */
|
||||
d3d12_get_flags,
|
||||
NULL, /* set_coords */
|
||||
NULL, /* set_mvp */
|
||||
d3d12_gfx_load_texture,
|
||||
|
@ -1872,6 +1872,7 @@ static uint32_t d3d8_get_flags(void *data)
|
||||
uint32_t flags = 0;
|
||||
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_BLACK_FRAME_INSERTION);
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_MENU_FRAME_FILTERING);
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
@ -1899,6 +1899,7 @@ static uint32_t d3d9_get_flags(void *data)
|
||||
uint32_t flags = 0;
|
||||
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_BLACK_FRAME_INSERTION);
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_MENU_FRAME_FILTERING);
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
@ -2608,6 +2608,7 @@ static uint32_t gl_get_flags(void *data)
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_HARD_SYNC);
|
||||
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_BLACK_FRAME_INSERTION);
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_MENU_FRAME_FILTERING);
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
@ -115,7 +115,8 @@ enum display_flags
|
||||
GFX_CTX_FLAGS_MULTISAMPLING,
|
||||
GFX_CTX_FLAGS_CUSTOMIZABLE_SWAPCHAIN_IMAGES,
|
||||
GFX_CTX_FLAGS_HARD_SYNC,
|
||||
GFX_CTX_FLAGS_BLACK_FRAME_INSERTION
|
||||
GFX_CTX_FLAGS_BLACK_FRAME_INSERTION,
|
||||
GFX_CTX_FLAGS_MENU_FRAME_FILTERING
|
||||
};
|
||||
|
||||
enum shader_uniform_type
|
||||
|
@ -5166,21 +5166,38 @@ static bool setting_append_list(
|
||||
SD_FLAG_ADVANCED
|
||||
);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.menu_linear_filter,
|
||||
MENU_ENUM_LABEL_MENU_LINEAR_FILTER,
|
||||
MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
true,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_ADVANCED
|
||||
);
|
||||
if (string_is_equal(settings->arrays.menu_driver, "rgui"))
|
||||
{
|
||||
gfx_ctx_flags_t flags;
|
||||
bool setting_set = false;
|
||||
|
||||
if (video_driver_get_flags(&flags))
|
||||
if (BIT32_GET(flags.flags, GFX_CTX_FLAGS_MENU_FRAME_FILTERING))
|
||||
setting_set = true;
|
||||
|
||||
flags.flags = 0;
|
||||
|
||||
if (video_context_driver_get_flags(&flags))
|
||||
if (BIT32_GET(flags.flags, GFX_CTX_FLAGS_MENU_FRAME_FILTERING))
|
||||
setting_set = true;
|
||||
|
||||
if (setting_set)
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.menu_linear_filter,
|
||||
MENU_ENUM_LABEL_MENU_LINEAR_FILTER,
|
||||
MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
|
||||
true,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_ADVANCED
|
||||
);
|
||||
}
|
||||
|
||||
if (string_is_equal(settings->arrays.menu_driver, "xmb"))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user