(XDK) Buildfix

This commit is contained in:
twinaphex 2015-04-05 18:08:33 +02:00
parent e022372db5
commit e59d5a26b2
2 changed files with 28 additions and 29 deletions

View File

@ -106,40 +106,12 @@ static unsigned monitor_count;
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_HLSL)
static void d3d_deinit_shader(void *data)
{
d3d_video_t *d3d = (d3d_video_t*)data;
(void)d3d;
(void)data;
renderchain_deinit_shader();
}
static bool d3d_init_shader(void *data)
{
const char *shader_path = NULL;
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL)
const shader_backend_t *backend = NULL;
#endif
d3d_video_t *d3d = (d3d_video_t*)data;
settings_t *settings = config_get_ptr();
(void)d3d;
(void)data;
#if defined(HAVE_HLSL)
RARCH_LOG("D3D]: Using HLSL shader backend.\n");
backend = &hlsl_backend;
shader_path = settings->video.shader_path;
d3d->shader = backend;
if (!d3d->shader)
return false;
return d3d->shader->init(d3d, shader_path);
#elif defined(HAVE_CG)
return renderchain_init_shader(d3d);
#else
return false;
#endif
return renderchain_init_shader(data);
}
#endif

View File

@ -101,6 +101,33 @@ static bool renderchain_create_first_pass(void *data,
return true;
}
static void renderchain_deinit_shader(void)
{
}
static bool renderchain_init_shader(void *data)
{
const char *shader_path = NULL;
d3d_video_t *d3d = (d3d_video_t*)data;
settings_t *settings = config_get_ptr();
if (!d3d)
return false;
#if defined(HAVE_HLSL)
RARCH_LOG("D3D]: Using HLSL shader backend.\n");
shader_path = settings->video.shader_path;
d3d->shader = &hlsl_backend;
if (!d3d->shader)
return false;
return d3d->shader->init(d3d, shader_path);
#endif
return false;
}
static bool renderchain_init(void *data, const video_info_t *info)
{
d3d_video_t *chain = (d3d_video_t*)data;