mirror of
https://github.com/libretro/RetroArch
synced 2025-02-03 08:54:13 +00:00
Remove more extraneous elses
This commit is contained in:
parent
b1871b54c3
commit
5a77b1aef3
@ -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,8 +2905,7 @@ 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
|
||||||
if ((id >= MENU_SETTINGS_CORE_OPTION_START) &&
|
if ((id >= MENU_SETTINGS_CORE_OPTION_START) &&
|
||||||
|
@ -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)
|
||||||
|
@ -176,16 +176,14 @@ 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t input_state_net(unsigned port, unsigned device, unsigned index, unsigned id)
|
int16_t input_state_net(unsigned port, unsigned device, unsigned index, unsigned id)
|
||||||
{
|
{
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_SOCKET_LEGACY
|
#ifndef HAVE_SOCKET_LEGACY
|
||||||
|
10
retroarch.c
10
retroarch.c
@ -3131,14 +3131,12 @@ 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
|
return true;
|
||||||
{
|
|
||||||
old_rmenu_toggle = rmenu_toggle;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
old_rmenu_toggle = rmenu_toggle;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void update_frame_time(void)
|
static inline void update_frame_time(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user