mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 07:13:35 +00:00
Divorce menu->shader from menu_handle_t
This commit is contained in:
parent
aaf6d64432
commit
5fbfabab5b
@ -56,6 +56,7 @@ static const menu_ctx_driver_t *menu_ctx_drivers[] = {
|
|||||||
|
|
||||||
static menu_handle_t *menu_driver_data;
|
static menu_handle_t *menu_driver_data;
|
||||||
static const menu_ctx_driver_t *menu_driver_ctx;
|
static const menu_ctx_driver_t *menu_driver_ctx;
|
||||||
|
static struct video_shader *menu_driver_shader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* menu_driver_find_handle:
|
* menu_driver_find_handle:
|
||||||
@ -612,8 +613,8 @@ void *menu_init(const void *data)
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
menu->shader = (struct video_shader*)calloc(1, sizeof(struct video_shader));
|
menu_driver_shader = (struct video_shader*)calloc(1, sizeof(struct video_shader));
|
||||||
if (!menu->shader)
|
if (!menu_driver_shader)
|
||||||
goto error;
|
goto error;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -666,9 +667,9 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
|||||||
break;
|
break;
|
||||||
case RARCH_MENU_CTL_SHADER_DEINIT:
|
case RARCH_MENU_CTL_SHADER_DEINIT:
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
if (menu_driver_data->shader)
|
if (menu_driver_shader)
|
||||||
free(menu_driver_data->shader);
|
free(menu_driver_shader);
|
||||||
menu_driver_data->shader = NULL;
|
menu_driver_shader = NULL;
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
case RARCH_MENU_CTL_SHADER_GET:
|
case RARCH_MENU_CTL_SHADER_GET:
|
||||||
@ -676,7 +677,7 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
|||||||
struct video_shader **shader = (struct video_shader**)data;
|
struct video_shader **shader = (struct video_shader**)data;
|
||||||
if (!shader)
|
if (!shader)
|
||||||
return false;
|
return false;
|
||||||
*shader = menu_driver_data ? menu_driver_data->shader : NULL;
|
*shader = menu_driver_shader;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case RARCH_MENU_CTL_FRAME:
|
case RARCH_MENU_CTL_FRAME:
|
||||||
|
@ -30,12 +30,13 @@
|
|||||||
#include "menu_entries.h"
|
#include "menu_entries.h"
|
||||||
#include "menu_setting.h"
|
#include "menu_setting.h"
|
||||||
|
|
||||||
|
#include "../gfx/video_shader_driver.h"
|
||||||
|
|
||||||
#include "../driver.h"
|
#include "../driver.h"
|
||||||
#include "../libretro.h"
|
#include "../libretro.h"
|
||||||
#include "../playlist.h"
|
#include "../playlist.h"
|
||||||
#include "../input/input_driver.h"
|
#include "../input/input_driver.h"
|
||||||
#include "../dynamic.h"
|
#include "../dynamic.h"
|
||||||
#include "../gfx/video_shader_driver.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -243,7 +244,6 @@ typedef struct
|
|||||||
/* Menu shader */
|
/* Menu shader */
|
||||||
char default_glslp[PATH_MAX_LENGTH];
|
char default_glslp[PATH_MAX_LENGTH];
|
||||||
char default_cgp[PATH_MAX_LENGTH];
|
char default_cgp[PATH_MAX_LENGTH];
|
||||||
struct video_shader *shader;
|
|
||||||
|
|
||||||
content_playlist_t *playlist;
|
content_playlist_t *playlist;
|
||||||
char db_playlist_file[PATH_MAX_LENGTH];
|
char db_playlist_file[PATH_MAX_LENGTH];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user