mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 21:39:54 +00:00
(Menu) Ugly hack but it gets the shader passes working again
This commit is contained in:
parent
bf2e1a709d
commit
d72b368dc5
@ -39,6 +39,9 @@
|
|||||||
#define HAVE_SHADER_MANAGER
|
#define HAVE_SHADER_MANAGER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// FIXME: Ugly hack, nees to be refactored badly
|
||||||
|
static size_t hack_shader_pass = 0;
|
||||||
|
|
||||||
static void *get_last_setting(const file_list_t *list, int index,
|
static void *get_last_setting(const file_list_t *list, int index,
|
||||||
rarch_setting_t *settings)
|
rarch_setting_t *settings)
|
||||||
{
|
{
|
||||||
@ -1624,6 +1627,7 @@ static int menu_custom_bind_iterate_keyboard(void *data, unsigned action)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int menu_action_ok(const char *dir,
|
static int menu_action_ok(const char *dir,
|
||||||
const char *menu_label, unsigned menu_type)
|
const char *menu_label, unsigned menu_type)
|
||||||
{
|
{
|
||||||
@ -1722,10 +1726,8 @@ static int menu_action_ok(const char *dir,
|
|||||||
else if (!strcmp(menu_label, "video_shader_pass")
|
else if (!strcmp(menu_label, "video_shader_pass")
|
||||||
&& type == MENU_FILE_PLAIN)
|
&& type == MENU_FILE_PLAIN)
|
||||||
{
|
{
|
||||||
unsigned pass = menu_type - MENU_SETTINGS_SHADER_PASS_0;
|
fill_pathname_join(driver.menu->shader->pass[hack_shader_pass].source.path,
|
||||||
|
dir, path, sizeof(driver.menu->shader->pass[hack_shader_pass].source.path));
|
||||||
fill_pathname_join(driver.menu->shader->pass[pass].source.path,
|
|
||||||
dir, path, sizeof(driver.menu->shader->pass[pass].source.path));
|
|
||||||
|
|
||||||
/* This will reset any changed parameters. */
|
/* This will reset any changed parameters. */
|
||||||
gfx_shader_resolve_parameters(NULL, driver.menu->shader);
|
gfx_shader_resolve_parameters(NULL, driver.menu->shader);
|
||||||
|
@ -388,12 +388,12 @@ static int menu_common_shader_manager_setting_toggle(
|
|||||||
}
|
}
|
||||||
else if (!strcmp(label, "video_shader_pass"))
|
else if (!strcmp(label, "video_shader_pass"))
|
||||||
{
|
{
|
||||||
unsigned pass = id - MENU_SETTINGS_SHADER_PASS_0;
|
hack_shader_pass = id - MENU_SETTINGS_SHADER_PASS_0;
|
||||||
struct gfx_shader *shader = (struct gfx_shader*)driver.menu->shader;
|
struct gfx_shader *shader = (struct gfx_shader*)driver.menu->shader;
|
||||||
struct gfx_shader_pass *shader_pass = NULL;
|
struct gfx_shader_pass *shader_pass = NULL;
|
||||||
|
|
||||||
if (shader)
|
if (shader)
|
||||||
shader_pass = (struct gfx_shader_pass*)&shader->pass[pass];
|
shader_pass = (struct gfx_shader_pass*)&shader->pass[hack_shader_pass];
|
||||||
|
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user