mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 18:40:49 +00:00
Remove hashes from task_overlay
This commit is contained in:
parent
938f6cc26e
commit
fae9223641
@ -28,12 +28,6 @@
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define BOX_RADIAL 0x18df06d2U
|
||||
#define BOX_RECT 0x7c9d4d93U
|
||||
|
||||
#define KEY_ANALOG_LEFT 0x56b92e81U
|
||||
#define KEY_ANALOG_RIGHT 0x2e4dc654U
|
||||
|
||||
/* Overlay driver acts as a medium between input drivers
|
||||
* and video driver.
|
||||
*
|
||||
|
@ -110,7 +110,6 @@ static bool task_overlay_load_desc(
|
||||
bool normalized, float alpha_mod, float range_mod)
|
||||
{
|
||||
float width_mod, height_mod;
|
||||
uint32_t box_hash, key_hash;
|
||||
char overlay_desc_key[64];
|
||||
char conf_key[64];
|
||||
char overlay_desc_normalized_key[64];
|
||||
@ -174,22 +173,14 @@ static bool task_overlay_load_desc(
|
||||
y = list->elems[2].data;
|
||||
box = list->elems[3].data;
|
||||
|
||||
box_hash = djb2_calculate(box);
|
||||
key_hash = djb2_calculate(key);
|
||||
|
||||
desc->retro_key_idx = 0;
|
||||
BIT256_CLEAR_ALL(desc->button_mask);
|
||||
|
||||
switch (key_hash)
|
||||
{
|
||||
case KEY_ANALOG_LEFT:
|
||||
if (string_is_equal(key, "analog_left"))
|
||||
desc->type = OVERLAY_TYPE_ANALOG_LEFT;
|
||||
break;
|
||||
case KEY_ANALOG_RIGHT:
|
||||
else if (string_is_equal(key, "analog_right"))
|
||||
desc->type = OVERLAY_TYPE_ANALOG_RIGHT;
|
||||
break;
|
||||
default:
|
||||
if (strstr(key, "retrok_") == key)
|
||||
else if (strstr(key, "retrok_") == key)
|
||||
{
|
||||
desc->type = OVERLAY_TYPE_KEYBOARD;
|
||||
desc->retro_key_idx = input_config_translate_str_to_rk(key + 7);
|
||||
@ -217,8 +208,6 @@ static bool task_overlay_load_desc(
|
||||
desc->next_index_name, sizeof(desc->next_index_name));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
width_mod = 1.0f;
|
||||
height_mod = 1.0f;
|
||||
@ -232,15 +221,12 @@ static bool task_overlay_load_desc(
|
||||
desc->x = (float)strtod(x, NULL) * width_mod;
|
||||
desc->y = (float)strtod(y, NULL) * height_mod;
|
||||
|
||||
switch (box_hash)
|
||||
{
|
||||
case BOX_RADIAL:
|
||||
if (string_is_equal(box, "radial"))
|
||||
desc->hitbox = OVERLAY_HITBOX_RADIAL;
|
||||
break;
|
||||
case BOX_RECT:
|
||||
else if (string_is_equal(box, "rect"))
|
||||
desc->hitbox = OVERLAY_HITBOX_RECT;
|
||||
break;
|
||||
default:
|
||||
else
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Hitbox type (%s) is invalid. Use \"radial\" or \"rect\".\n", box);
|
||||
ret = false;
|
||||
goto end;
|
||||
|
Loading…
x
Reference in New Issue
Block a user