We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 484 - Joystick button states fail to update
Summary: Joystick button states fail to update
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.0
Hardware: x86 Windows (XP)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-28 11:45 UTC by Oskari Nyman
Modified: 2007-08-28 12:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oskari Nyman 2007-08-28 11:45:52 UTC
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.
Comment 1 Oskari Nyman 2007-08-28 12:21:39 UTC
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.