mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
fix SHADER_NEXT/SHADER_PREV
This commit is contained in:
parent
bc90062366
commit
37454f79a8
@ -245,6 +245,7 @@ bool command_set_shader(const char *arg)
|
||||
msg_hash_to_str(MSG_APPLYING_SHADER),
|
||||
arg);
|
||||
|
||||
retroarch_set_shader_preset(arg);
|
||||
return video_driver_set_shader(type, arg);
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,8 @@
|
||||
#include <gfx/video_frame.h>
|
||||
#include <formats/image.h>
|
||||
|
||||
#include "menu/menu_shader.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
@ -672,9 +674,17 @@ retro_proc_address_t video_driver_get_proc_address(const char *sym)
|
||||
bool video_driver_set_shader(enum rarch_shader_type type,
|
||||
const char *path)
|
||||
{
|
||||
bool ret = false;
|
||||
if (current_video->set_shader)
|
||||
return current_video->set_shader(video_driver_data, type, path);
|
||||
return false;
|
||||
ret = current_video->set_shader(video_driver_data, type, path);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
menu_shader_manager_free();
|
||||
menu_shader_manager_init();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void video_driver_filter_free(void)
|
||||
|
@ -1926,7 +1926,7 @@ void retroarch_unset_forced_fullscreen(void)
|
||||
}
|
||||
|
||||
/* set a runtime shader preset without overwriting the settings value */
|
||||
void retroarch_set_shader_preset(char* preset)
|
||||
void retroarch_set_shader_preset(const char* preset)
|
||||
{
|
||||
if (!string_is_empty(preset))
|
||||
strlcpy(runtime_shader_preset, preset, sizeof(runtime_shader_preset));
|
||||
|
@ -288,7 +288,7 @@ void retroarch_unset_forced_fullscreen(void);
|
||||
|
||||
void retroarch_set_current_core_type(enum rarch_core_type type, bool explicitly_set);
|
||||
|
||||
void retroarch_set_shader_preset(char* preset);
|
||||
void retroarch_set_shader_preset(const char* preset);
|
||||
|
||||
void retroarch_unset_shader_preset(void);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user