Rename KEYCODE_MAPPED_NUM to KEYCODE_MAP_SIZE

This commit is contained in:
M374LX 2024-01-16 18:37:34 -03:00
parent 44c18cb683
commit e98b628c15

View File

@ -80,8 +80,8 @@ static PlatformData platform = { 0 }; // Platform specific data
//----------------------------------------------------------------------------------
// Local Variables Definition
//----------------------------------------------------------------------------------
#define KEYCODE_MAPPED_NUM 162
static const KeyboardKey KeycodeMap[KEYCODE_MAPPED_NUM] = {
#define KEYCODE_MAP_SIZE 162
static const KeyboardKey KeycodeMap[KEYCODE_MAP_SIZE] = {
KEY_NULL, // AKEYCODE_UNKNOWN
0, // AKEYCODE_SOFT_LEFT
0, // AKEYCODE_SOFT_RIGHT
@ -1185,7 +1185,7 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
return 1; // Handled gamepad button
}
KeyboardKey key = (keycode > 0 && keycode < KEYCODE_MAPPED_NUM) ? KeycodeMap[keycode] : KEY_NULL;
KeyboardKey key = (keycode > 0 && keycode < KEYCODE_MAP_SIZE) ? KeycodeMap[keycode] : KEY_NULL;
if (key != KEY_NULL)
{
// Save current key and its state