Skip to content

Commit

Permalink
Rename KEYCODE_MAPPED_NUM to KEYCODE_MAP_SIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
M374LX committed Jan 16, 2024
1 parent 44c18cb commit e98b628
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/platforms/rcore_android.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e98b628

Please sign in to comment.