Remove more extraneous elses

This commit is contained in:
twinaphex 2014-08-27 04:02:32 +02:00
parent b1871b54c3
commit 5a77b1aef3
4 changed files with 10 additions and 18 deletions

View File

@ -2629,7 +2629,7 @@ static void menu_common_shader_manager_save_preset(const char *basename, bool ap
{ {
#ifdef HAVE_SHADER_MANAGER #ifdef HAVE_SHADER_MANAGER
char buffer[PATH_MAX], config_directory[PATH_MAX], cgp_path[PATH_MAX]; char buffer[PATH_MAX], config_directory[PATH_MAX], cgp_path[PATH_MAX];
unsigned d, type; unsigned d, type = RARCH_SHADER_NONE;
config_file_t *conf; config_file_t *conf;
const char *conf_path = NULL; const char *conf_path = NULL;
bool ret = false; bool ret = false;
@ -2642,8 +2642,6 @@ static void menu_common_shader_manager_save_preset(const char *basename, bool ap
if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->shader_manager_get_type) if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->shader_manager_get_type)
type = driver.menu_ctx->backend->shader_manager_get_type(driver.menu->shader); type = driver.menu_ctx->backend->shader_manager_get_type(driver.menu->shader);
else
type = RARCH_SHADER_NONE;
if (type == RARCH_SHADER_NONE) if (type == RARCH_SHADER_NONE)
return; return;
@ -2907,7 +2905,6 @@ static int menu_common_setting_toggle(unsigned id, unsigned action,
{ {
if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->shader_manager_setting_toggle) if (driver.menu_ctx && driver.menu_ctx->backend && driver.menu_ctx->backend->shader_manager_setting_toggle)
return driver.menu_ctx->backend->shader_manager_setting_toggle(id, action, setting); return driver.menu_ctx->backend->shader_manager_setting_toggle(id, action, setting);
else
return 0; return 0;
} }
#endif #endif

View File

@ -162,16 +162,15 @@ static bool rguidisp_init_font(void *data)
const uint8_t *font_bmp_buf = NULL; const uint8_t *font_bmp_buf = NULL;
const uint8_t *font_bin_buf = bitmap_bin; const uint8_t *font_bin_buf = bitmap_bin;
bool ret = true;
if (font_bmp_buf) if (font_bmp_buf)
init_font(menu, font_bmp_buf); init_font(menu, font_bmp_buf);
else if (font_bin_buf) else if (font_bin_buf)
menu->font = font_bin_buf; menu->font = font_bin_buf;
else else
ret = false; return false;
return ret; return true;
} }
static void rgui_render_background(void) static void rgui_render_background(void)

View File

@ -176,7 +176,6 @@ size_t audio_sample_batch_net(const int16_t *data, size_t frames)
{ {
if (!netplay_should_skip(g_extern.netplay)) if (!netplay_should_skip(g_extern.netplay))
return g_extern.netplay->cbs.sample_batch_cb(data, frames); return g_extern.netplay->cbs.sample_batch_cb(data, frames);
else
return frames; return frames;
} }
@ -184,7 +183,6 @@ int16_t input_state_net(unsigned port, unsigned device, unsigned index, unsigned
{ {
if (netplay_is_alive(g_extern.netplay)) if (netplay_is_alive(g_extern.netplay))
return netplay_input_state(g_extern.netplay, port, device, index, id); return netplay_input_state(g_extern.netplay, port, device, index, id);
else
return g_extern.netplay->cbs.state_cb(port, device, index, id); return g_extern.netplay->cbs.state_cb(port, device, index, id);
} }

View File

@ -3131,16 +3131,14 @@ static inline bool check_enter_menu(void)
g_extern.lifecycle_state |= (1ULL << MODE_MENU_PREINIT); g_extern.lifecycle_state |= (1ULL << MODE_MENU_PREINIT);
old_rmenu_toggle = true; old_rmenu_toggle = true;
g_extern.system.frame_time_last = 0; g_extern.system.frame_time_last = 0;
}
else
{
old_rmenu_toggle = rmenu_toggle;
return false;
}
return true; return true;
} }
old_rmenu_toggle = rmenu_toggle;
return false;
}
static inline void update_frame_time(void) static inline void update_frame_time(void)
{ {
retro_time_t time = 0; retro_time_t time = 0;