(Cg/GLSL) Cleanups to filter_type implementation

This commit is contained in:
twinaphex 2014-10-02 15:25:01 +02:00
parent e7e441d32d
commit 4c6fa4f059
2 changed files with 8 additions and 8 deletions

View File

@ -952,11 +952,11 @@ static unsigned gl_cg_num(void)
static bool gl_cg_filter_type(unsigned index, bool *smooth)
{
if (cg_active && index)
if (cg_active && index &&
(cg_shader->pass[index - 1].filter != RARCH_FILTER_UNSPEC)
)
{
if (cg_shader->pass[index - 1].filter == RARCH_FILTER_UNSPEC)
return false;
*smooth = cg_shader->pass[index - 1].filter == RARCH_FILTER_LINEAR;
*smooth = (cg_shader->pass[index - 1].filter == RARCH_FILTER_LINEAR);
return true;
}

View File

@ -1190,11 +1190,11 @@ static unsigned gl_glsl_num(void)
static bool gl_glsl_filter_type(unsigned index, bool *smooth)
{
if (glsl_enable && index)
if (glsl_enable && index
&& (glsl_shader->pass[index - 1].filter != RARCH_FILTER_UNSPEC)
)
{
if (glsl_shader->pass[index - 1].filter == RARCH_FILTER_UNSPEC)
return false;
*smooth = glsl_shader->pass[index - 1].filter == RARCH_FILTER_LINEAR;
*smooth = (glsl_shader->pass[index - 1].filter == RARCH_FILTER_LINEAR);
return true;
}
return false;