mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
Create video_driver_set_shader
This commit is contained in:
parent
820595379e
commit
6f165b6801
@ -252,6 +252,16 @@ bool video_driver_has_focus(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool video_driver_set_shader(enum rarch_shader_type type,
|
||||
const char *shader)
|
||||
{
|
||||
if (!driver.video || !driver.video_data)
|
||||
return false;
|
||||
if (!driver.video->set_shader(driver.video_data, type, shader))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void deinit_video_filter(void)
|
||||
{
|
||||
rarch_softfilter_free(g_extern.filter.filter);
|
||||
|
@ -248,6 +248,9 @@ bool video_driver_is_alive(void);
|
||||
|
||||
bool video_driver_has_focus(void);
|
||||
|
||||
bool video_driver_set_shader(enum rarch_shader_type type,
|
||||
const char *shader);
|
||||
|
||||
void uninit_video_input(void);
|
||||
|
||||
void init_video(void);
|
||||
|
@ -417,7 +417,7 @@ static void check_shader_dir(bool pressed_next, bool pressed_prev)
|
||||
const char *shader = NULL, *ext = NULL;
|
||||
enum rarch_shader_type type = RARCH_SHADER_NONE;
|
||||
|
||||
if (!g_extern.shader_dir.list || !driver.video->set_shader)
|
||||
if (!g_extern.shader_dir.list)
|
||||
return;
|
||||
|
||||
if (pressed_next)
|
||||
@ -452,7 +452,7 @@ static void check_shader_dir(bool pressed_next, bool pressed_prev)
|
||||
msg_queue_push(g_extern.msg_queue, msg, 1, 120);
|
||||
RARCH_LOG("Applying shader \"%s\".\n", shader);
|
||||
|
||||
if (!driver.video->set_shader(driver.video_data, type, shader))
|
||||
if (!video_driver_set_shader(type, shader))
|
||||
RARCH_WARN("Failed to apply shader.\n");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user