mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Cleanups
This commit is contained in:
parent
efbfe85da4
commit
4b5ea2877e
@ -297,12 +297,7 @@ static bool hlsl_load_shader(hlsl_shader_data_t *hlsl,
|
||||
|
||||
static bool hlsl_load_plain(hlsl_shader_data_t *hlsl, const char *path)
|
||||
{
|
||||
struct video_shader *cg_shader = NULL;
|
||||
|
||||
if (!hlsl_load_stock(hlsl))
|
||||
return false;
|
||||
|
||||
cg_shader = (struct video_shader*)
|
||||
struct video_shader *cg_shader = (struct video_shader*)
|
||||
calloc(1, sizeof(*cg_shader));
|
||||
|
||||
if (!cg_shader)
|
||||
@ -338,17 +333,13 @@ static bool hlsl_load_plain(hlsl_shader_data_t *hlsl, const char *path)
|
||||
static bool hlsl_load_preset(hlsl_shader_data_t *hlsl, const char *path)
|
||||
{
|
||||
unsigned i;
|
||||
config_file_t *conf = NULL;
|
||||
if (!hlsl_load_stock(hlsl))
|
||||
return false;
|
||||
|
||||
RARCH_LOG("Loading Cg meta-shader: %s\n", path);
|
||||
|
||||
conf = config_file_new(path);
|
||||
config_file_t *conf = config_file_new(path);
|
||||
|
||||
if (!conf)
|
||||
goto error;
|
||||
|
||||
RARCH_LOG("Loaded Cg meta-shader: %s\n", path);
|
||||
|
||||
if (!hlsl->cg_shader)
|
||||
hlsl->cg_shader = (struct video_shader*)calloc
|
||||
(1, sizeof(*hlsl->cg_shader));
|
||||
@ -402,6 +393,9 @@ static hlsl_shader_data_t *hlsl_init(d3d9_video_t *d3d, const char *path)
|
||||
if (!hlsl->dev)
|
||||
goto error;
|
||||
|
||||
if (!hlsl_load_stock(hlsl))
|
||||
goto error;
|
||||
|
||||
if (path && (string_is_equal(path_get_extension(path), ".cgp")))
|
||||
{
|
||||
if (!hlsl_load_preset(hlsl, path))
|
||||
|
Loading…
x
Reference in New Issue
Block a user