mirror of
https://github.com/libretro/RetroArch
synced 2025-03-22 16:20:58 +00:00
Remove logically dead code
This commit is contained in:
parent
39faa9be1b
commit
69759f5fd7
@ -501,9 +501,6 @@ database_info_list_t *database_info_list_new(
|
||||
database_info = new_ptr;
|
||||
db_ptr = &database_info[k];
|
||||
|
||||
if (!db_ptr)
|
||||
continue;
|
||||
|
||||
memcpy(db_ptr, &db_info, sizeof(*db_ptr));
|
||||
|
||||
k++;
|
||||
@ -535,9 +532,6 @@ void database_info_list_free(database_info_list_t *database_info_list)
|
||||
{
|
||||
database_info_t *info = &database_info_list->list[i];
|
||||
|
||||
if (!info)
|
||||
continue;
|
||||
|
||||
if (info->name)
|
||||
free(info->name);
|
||||
if (info->rom_name)
|
||||
|
@ -101,22 +101,16 @@ static void input_overlay_scale(struct overlay *ol, float scale)
|
||||
|
||||
for (i = 0; i < ol->size; i++)
|
||||
{
|
||||
float scale_w, scale_h, adj_center_x, adj_center_y;
|
||||
struct overlay_desc *desc = &ol->descs[i];
|
||||
float scale_w = ol->mod_w * desc->range_x;
|
||||
float scale_h = ol->mod_h * desc->range_y;
|
||||
float adj_center_x = ol->mod_x + desc->x * ol->mod_w;
|
||||
float adj_center_y = ol->mod_y + desc->y * ol->mod_h;
|
||||
|
||||
if (!desc)
|
||||
continue;
|
||||
|
||||
scale_w = ol->mod_w * desc->range_x;
|
||||
scale_h = ol->mod_h * desc->range_y;
|
||||
|
||||
desc->mod_w = 2.0f * scale_w;
|
||||
desc->mod_h = 2.0f * scale_h;
|
||||
|
||||
adj_center_x = ol->mod_x + desc->x * ol->mod_w;
|
||||
adj_center_y = ol->mod_y + desc->y * ol->mod_h;
|
||||
desc->mod_x = adj_center_x - scale_w;
|
||||
desc->mod_y = adj_center_y - scale_h;
|
||||
desc->mod_w = 2.0f * scale_w;
|
||||
desc->mod_h = 2.0f * scale_h;
|
||||
desc->mod_x = adj_center_x - scale_w;
|
||||
desc->mod_y = adj_center_y - scale_h;
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,9 +130,6 @@ static void input_overlay_set_vertex_geom(void)
|
||||
{
|
||||
struct overlay_desc *desc = &ol->active->descs[i];
|
||||
|
||||
if (!desc)
|
||||
continue;
|
||||
|
||||
if (!desc->image.pixels)
|
||||
continue;
|
||||
|
||||
@ -313,8 +304,6 @@ static void input_overlay_poll(input_overlay_state_t *out,
|
||||
float x_dist, y_dist;
|
||||
struct overlay_desc *desc = &ol->active->descs[i];
|
||||
|
||||
if (!desc)
|
||||
continue;
|
||||
if (!inside_hitbox(desc, x, y))
|
||||
continue;
|
||||
|
||||
@ -413,9 +402,6 @@ static void input_overlay_post_poll(float opacity)
|
||||
{
|
||||
struct overlay_desc *desc = &ol->active->descs[i];
|
||||
|
||||
if (!desc)
|
||||
continue;
|
||||
|
||||
desc->range_x_mod = desc->range_x;
|
||||
desc->range_y_mod = desc->range_y;
|
||||
|
||||
@ -461,9 +447,6 @@ static void input_overlay_poll_clear(float opacity)
|
||||
{
|
||||
struct overlay_desc *desc = &ol->active->descs[i];
|
||||
|
||||
if (!desc)
|
||||
continue;
|
||||
|
||||
desc->range_x_mod = desc->range_x;
|
||||
desc->range_y_mod = desc->range_y;
|
||||
desc->updated = false;
|
||||
@ -629,10 +612,6 @@ bool input_overlay_is_alive(void)
|
||||
bool input_overlay_key_pressed(int key)
|
||||
{
|
||||
input_overlay_state_t *ol_state = &overlay_st_ptr;
|
||||
|
||||
if (!ol_state)
|
||||
return false;
|
||||
|
||||
return (ol_state->buttons & (UINT64_C(1) << key));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user