mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Added RETRO_ENVIRONMENT_GET_PREFERRED_HW_RENDER.
This commit is contained in:
parent
d1a74e1b96
commit
839747f420
19
retroarch.c
19
retroarch.c
@ -7833,6 +7833,24 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
*(const struct retro_disk_control_callback*)data;
|
||||
break;
|
||||
|
||||
case RETRO_ENVIRONMENT_GET_PREFERRED_HW_RENDER:
|
||||
{
|
||||
RARCH_LOG("[Environ]: GET_PREFERRED_HW_RENDER.\n");
|
||||
unsigned *cb = (unsigned*)data;
|
||||
settings_t *settings = configuration_settings;
|
||||
if (!strcmp(settings->arrays.video_driver, "glcore"))
|
||||
*cb = RETRO_HW_CONTEXT_OPENGL_CORE;
|
||||
else if (!strcmp(settings->arrays.video_driver, "gl"))
|
||||
*cb = RETRO_HW_CONTEXT_OPENGL;
|
||||
else if (!strcmp(settings->arrays.video_driver, "vulkan"))
|
||||
*cb = RETRO_HW_CONTEXT_VULKAN;
|
||||
else if (!strncmp(settings->arrays.video_driver, "d3d", 3))
|
||||
*cb = RETRO_HW_CONTEXT_DIRECT3D;
|
||||
else
|
||||
*cb = RETRO_HW_CONTEXT_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
case RETRO_ENVIRONMENT_SET_HW_RENDER:
|
||||
case RETRO_ENVIRONMENT_SET_HW_RENDER | RETRO_ENVIRONMENT_EXPERIMENTAL:
|
||||
{
|
||||
@ -7879,7 +7897,6 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case RETRO_ENVIRONMENT_GET_LIBRETRO_PATH:
|
||||
{
|
||||
const char **path = (const char**)data;
|
||||
|
Loading…
Reference in New Issue
Block a user