Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Jul 1, 2024
1 parent c8313d9 commit 61cfd1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/platforms/rcore_desktop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ void PollInputEvents(void)

const unsigned char *buttons = state.buttons;

for (int k = 0; (buttons != NULL) && (k < GLFW_GAMEPAD_BUTTON_DPAD_LEFT + 1) && (k < MAX_GAMEPAD_BUTTONS); k++)
for (int k = 0; (buttons != NULL) && (k < MAX_GAMEPAD_BUTTONS); k++)
{
int button = -1; // GamepadButton enum values assigned

Expand Down Expand Up @@ -1189,7 +1189,7 @@ void PollInputEvents(void)
// Get current axis state
const float *axes = state.axes;

for (int k = 0; (axes != NULL) && (k < GLFW_GAMEPAD_AXIS_LAST + 1) && (k < MAX_GAMEPAD_AXIS); k++)
for (int k = 0; (axes != NULL) && (k < GLFW_GAMEPAD_AXIS_LAST + 1); k++)
{
CORE.Input.Gamepad.axisState[i][k] = axes[k];
}
Expand Down
2 changes: 1 addition & 1 deletion src/rshapes.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ void DrawCircleSector(Vector2 center, float radius, float startAngle, float endA
}

// NOTE: In case number of segments is odd, we add one last piece to the cake
if (((unsigned int)segments%2) == 1)
if ((((unsigned int)segments)%2) == 1)
{
rlColor4ub(color.r, color.g, color.b, color.a);

Expand Down

0 comments on commit 61cfd1a

Please sign in to comment.