| Summary: | Joystick button states fail to update | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Oskari Nyman <asko> |
| Component: | joystick | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Windows (XP) | ||
Seems this is not the problem after all. Instead my joystick seems to shift the button state bits in joyinfo.dwButtons by 4 bits to the left. Obviously it's a problem in the joystick itself (it's custom made). Windows control panel seems to detect this though, and shows 4 extra buttons. But there's nothing in the device caps that would indicate it, so it's probably not worth fixing. |
Joystick button pushes are not detected for my USB joystick. It's probably a rare case, so before I scare you away, let me reveal the problem: In /src/joystick/win32/SDL_mmjoystick.c, function SDL_SYS_JoystickUpdate() JOYINFOEX joyinfo; ^ This struct should be zeroed out before using it, meaning: ZeroMemory(&joyinfo, sizeof(joyinfo)); That fixes it.