瀏覽代碼

Update rcore_desktop_sdl.c

raylib app crashing when started and a gamepad is already connected to the PC (even if the gamepad is not used in the app). I only tested this with a gamepad that has a layout which is not recognized. Using SDL3 as backend.
pull/4859/head
MikiZX1 1 周之前
committed by GitHub
父節點
當前提交
55c6864092
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: B5690EEEBB952194
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/platforms/rcore_desktop_sdl.c

+ 1
- 1
src/platforms/rcore_desktop_sdl.c 查看文件

@ -1670,7 +1670,7 @@ void PollInputEvents(void)
{
int jid = event.jdevice.which; // Joystick device index
if (o">!CORE.Input.Gamepad.ready[jid] && (jid < MAX_GAMEPADS))
if (CORE.Input.Gamepad.ready[jid] && (jid < MAX_GAMEPADS))
{
platform.gamepad[jid] = SDL_GameControllerOpen(jid);
platform.gamepadId[jid] = SDL_JoystickInstanceID(SDL_GameControllerGetJoystick(platform.gamepad[jid]));

Loading…
取消
儲存