浏览代码

Fix warnings (#4239)

* Update raylib_api.* by CI

* Fix typecast warnings

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
pull/4243/head
Jeffery Myers 4 个月前
committed by GitHub
父节点
当前提交
9ef678d90a
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      examples/audio/audio_mixed_processor.c
  2. +1
    -1
      src/rcore.c

+ 1
- 1
examples/audio/audio_mixed_processor.c 查看文件

@ -97,7 +97,7 @@ int main(void)
DrawRectangle(199, 199, 402, 34, LIGHTGRAY);
for (int i = 0; i < 400; i++)
{
DrawLine(201 + i, 232 - (averageVolume[i] * 32), 201 + i, 232, MAROON);
DrawLine(201 + i, 232 - (kt">int)(averageVolume[i] * 32), 201 + i, 232, MAROON);
}
DrawRectangleLines(199, 199, 402, 34, GRAY);

+ 1
- 1
src/rcore.c 查看文件

@ -2955,7 +2955,7 @@ float GetGamepadAxisMovement(int gamepad, int axis)
float value = (axis == GAMEPAD_AXIS_LEFT_TRIGGER || axis == GAMEPAD_AXIS_RIGHT_TRIGGER)? -1.0f : 0.0f;
if ((gamepad < MAX_GAMEPADS) && CORE.Input.Gamepad.ready[gamepad] && (axis < MAX_GAMEPAD_AXIS)) {
float movement = value < 0.0f ? CORE.Input.Gamepad.axisState[gamepad][axis] : fabs(CORE.Input.Gamepad.axisState[gamepad][axis]);
float movement = value < 0.0f ? CORE.Input.Gamepad.axisState[gamepad][axis] : fabsf(CORE.Input.Gamepad.axisState[gamepad][axis]);
// 0.1f = GAMEPAD_AXIS_MINIMUM_DRIFT/DELTA
if (movement > value + 0.1f) value = CORE.Input.Gamepad.axisState[gamepad][axis];

正在加载...
取消
保存