mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 13:14:04 +00:00
Cleanup extraneous elses
This commit is contained in:
parent
cec2afe6cb
commit
228569c8f8
@ -165,7 +165,7 @@ static bool gl_cg_set_mvp(void *data, const math_matrix *mat)
|
||||
cgGLSetMatrixParameterfc(prg[active_index].mvp, mat->data);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -876,7 +876,6 @@ static unsigned gl_cg_num(void)
|
||||
{
|
||||
if (cg_active)
|
||||
return cg_shader->passes;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -889,7 +888,7 @@ static bool gl_cg_filter_type(unsigned index, bool *smooth)
|
||||
*smooth = cg_shader->pass[index - 1].filter == RARCH_FILTER_LINEAR;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -897,7 +896,6 @@ static enum gfx_wrap_type gl_cg_wrap_type(unsigned index)
|
||||
{
|
||||
if (cg_active && index)
|
||||
return cg_shader->pass[index - 1].wrap;
|
||||
else
|
||||
return RARCH_WRAP_BORDER;
|
||||
}
|
||||
|
||||
@ -928,7 +926,6 @@ static bool gl_cg_mipmap_input(unsigned index)
|
||||
{
|
||||
if (cg_active && index)
|
||||
return cg_shader->pass[index - 1].mipmap;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,6 @@ static bool link_program(GLuint prog)
|
||||
glUseProgram(prog);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1148,7 +1147,6 @@ static bool gl_glsl_filter_type(unsigned index, bool *smooth)
|
||||
*smooth = glsl_shader->pass[index - 1].filter == RARCH_FILTER_LINEAR;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1156,7 +1154,6 @@ static enum gfx_wrap_type gl_glsl_wrap_type(unsigned index)
|
||||
{
|
||||
if (glsl_enable && index)
|
||||
return glsl_shader->pass[index - 1].wrap;
|
||||
else
|
||||
return RARCH_WRAP_BORDER;
|
||||
}
|
||||
|
||||
@ -1187,7 +1184,6 @@ static bool gl_glsl_mipmap_input(unsigned index)
|
||||
{
|
||||
if (glsl_enable && index)
|
||||
return glsl_shader->pass[index - 1].mipmap;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -390,7 +390,6 @@ static unsigned hlsl_num(void)
|
||||
{
|
||||
if (hlsl_active)
|
||||
return cg_shader->passes;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -403,7 +402,6 @@ static bool hlsl_filter_type(unsigned index, bool *smooth)
|
||||
*smooth = cg_shader->pass[index - 1].filter = RARCH_FILTER_LINEAR;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -425,7 +423,6 @@ static bool hlsl_set_mvp(void *data, const math_matrix *mat)
|
||||
prg[active_index].v_ctable->SetMatrix(d3d_device_ptr, prg[active_index].mvp, (D3DXMATRIX*)&prg[active_index].mvp_val);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -332,7 +332,7 @@ static bool apple_joypad_button(unsigned port, uint16_t joykey)
|
||||
// Check hat.
|
||||
if (GET_HAT_DIR(joykey))
|
||||
return false;
|
||||
else // Check the button
|
||||
// Check the button
|
||||
return (port < MAX_PLAYERS && joykey < 32) ? (g_current_input_data.pad_buttons[port] & (1 << joykey)) != 0 : false;
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,6 @@ static bool linuxraw_is_pressed(linuxraw_input_t *linuxraw, const struct retro_k
|
||||
const struct retro_keybind *bind = &binds[id];
|
||||
return bind->valid && linuxraw_key_pressed(linuxraw, binds[id].key);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -103,12 +103,10 @@ static bool linuxraw_joypad_init_pad(const char *path, struct linuxraw_joypad *p
|
||||
epoll_ctl(g_epoll, EPOLL_CTL_ADD, pad->fd, &event);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
RARCH_ERR("[Joypad]: Failed to open pad %s (error: %s).\n", path, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_plugged_pad(void)
|
||||
{
|
||||
|
@ -76,7 +76,6 @@ static inline int16_t compute_axis(const struct input_absinfo *info, int value)
|
||||
return 0x7fff;
|
||||
else if (axis < -0x7fff)
|
||||
return -0x7fff;
|
||||
else
|
||||
return axis;
|
||||
}
|
||||
|
||||
@ -532,7 +531,6 @@ static bool udev_joypad_button(unsigned port, uint16_t joykey)
|
||||
|
||||
if (GET_HAT_DIR(joykey))
|
||||
return udev_joypad_hat(pad, joykey);
|
||||
else
|
||||
return joykey < NUM_BUTTONS && pad->buttons[joykey];
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,6 @@ const char* winxinput_joypad_name (unsigned pad)
|
||||
|
||||
if (xplayer < 0)
|
||||
return dinput_joypad.name(pad);
|
||||
else
|
||||
// TODO: Different name if disconnected?
|
||||
return XBOX_CONTROLLER_NAMES[xplayer];
|
||||
}
|
||||
@ -245,7 +244,6 @@ static bool winxinput_joypad_query_pad(unsigned pad)
|
||||
int xplayer = pad_index_to_xplayer_index(pad);
|
||||
if (xplayer > -1)
|
||||
return g_winxinput_states[xplayer].connected;
|
||||
else
|
||||
return dinput_joypad.query_pad(pad);
|
||||
}
|
||||
|
||||
@ -392,7 +390,6 @@ static bool winxinput_joypad_rumble(unsigned pad, enum retro_rumble_effect effec
|
||||
{
|
||||
if (dinput_joypad.set_rumble)
|
||||
return dinput_joypad.set_rumble(pad, effect, strength);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,6 @@ static bool x_is_pressed(x11_input_t *x11, const struct retro_keybind *binds, un
|
||||
const struct retro_keybind *bind = &binds[id];
|
||||
return bind->valid && x_key_pressed(x11, binds[id].key);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user