mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
commit
1f3e1baeb6
@ -121,26 +121,9 @@ unsigned menu_shader_manager_get_amount_passes(void) { return 0; }
|
|||||||
void menu_shader_manager_free(void) { }
|
void menu_shader_manager_free(void) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
void menu_shader_manager_init_paths(void)
|
||||||
* menu_shader_manager_init:
|
|
||||||
*
|
|
||||||
* Initializes shader manager.
|
|
||||||
**/
|
|
||||||
bool menu_shader_manager_init(void)
|
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
const char *config_path = path_get(RARCH_PATH_CONFIG);
|
const char *config_path = path_get(RARCH_PATH_CONFIG);
|
||||||
const char *path_shader = retroarch_get_shader_preset();
|
|
||||||
|
|
||||||
menu_shader_manager_free();
|
|
||||||
|
|
||||||
menu_driver_shader = (struct video_shader*)
|
|
||||||
calloc(1, sizeof(struct video_shader));
|
|
||||||
|
|
||||||
if (!menu_driver_shader || !path_shader)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* In a multi-config setting, we can't have
|
/* In a multi-config setting, we can't have
|
||||||
* conflicts on menu.cgp/menu.glslp. */
|
* conflicts on menu.cgp/menu.glslp. */
|
||||||
if (config_path)
|
if (config_path)
|
||||||
@ -166,6 +149,28 @@ bool menu_shader_manager_init(void)
|
|||||||
strlcpy(default_slangp, "menu.slangp",
|
strlcpy(default_slangp, "menu.slangp",
|
||||||
sizeof(default_slangp));
|
sizeof(default_slangp));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* menu_shader_manager_init:
|
||||||
|
*
|
||||||
|
* Initializes shader manager.
|
||||||
|
**/
|
||||||
|
bool menu_shader_manager_init(void)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
const char *path_shader = retroarch_get_shader_preset();
|
||||||
|
|
||||||
|
menu_shader_manager_free();
|
||||||
|
|
||||||
|
menu_driver_shader = (struct video_shader*)
|
||||||
|
calloc(1, sizeof(struct video_shader));
|
||||||
|
|
||||||
|
if (!menu_driver_shader || !path_shader)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
menu_shader_manager_init_paths();
|
||||||
|
|
||||||
switch (msg_hash_to_file_type(msg_hash_calculate(
|
switch (msg_hash_to_file_type(msg_hash_calculate(
|
||||||
path_get_extension(path_shader))))
|
path_get_extension(path_shader))))
|
||||||
@ -321,6 +326,7 @@ bool menu_shader_manager_save_preset(
|
|||||||
buffer[0] = config_directory[0] = '\0';
|
buffer[0] = config_directory[0] = '\0';
|
||||||
preset_path[0] = '\0';
|
preset_path[0] = '\0';
|
||||||
|
|
||||||
|
menu_shader_manager_init_paths();
|
||||||
|
|
||||||
if (!shader)
|
if (!shader)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user