diff --git a/examples/core/core_input_actions.c b/examples/core/core_input_actions.c index b9b18c21d..633c3ee85 100644 --- a/examples/core/core_input_actions.c +++ b/examples/core/core_input_actions.c @@ -25,12 +25,13 @@ which can be reassigned to e.g. KEY_A and also assigned to a gamepad button. the action will trigger with either gamepad or keys */ + #include #include #include #include "raylib.h" // add your own action types here -enum +typedef enum ActionType { NO_ACTION, ACTION_UP, @@ -39,24 +40,24 @@ enum ACTION_RIGHT, ACTION_FIRE, MAX_ACTION -} Action_Type; +} ActionType; // struct for key and button inputs -typedef struct +typedef struct ActionInput { int key; int button; -} Action_Input_t; +} ActionInput; // gamepad index, change this if you have multiple gamepads. -int GamePadID = 0; -static Action_Input_t _actions[MAX_ACTION] = {0}; +int gamepadIndex = 0; +static ActionInput _actions[MAX_ACTION] = {0}; // combines IsKeyPressed and IsGameButtonPressed to one action bool isActionPressed(int action) { if (action