Skip to main content
GameDev.net gamedev.net
🔒 Locked

Problems with Input Maps in DirectInput

Started by MrDoomMaster Jan 23, 2006 at 12:15 PM 0 replies 400+ views
Original Post
MrDoomMaster
MrDoomMaster
My game controller has a properties window that shows the index of the button when you press it, 1 through 10. I matched these to various application defined constants using DIBUTTON_ANY(x), where x is any number 0 through 9 (representing each of the 10 buttons). For example, take this line:

	{ eB_GREEN, DIBUTTON_ANY(0), 0, TEXT("Accelerate") },
When pressing button 0, this should send eB_GREEN. This is not sent. I have no idea why. For some reason, DirectInput seems to work differently depending on how the DIACTION's are sorted in the array. This behavior is very unpredictable. Every single button is assigned a different application defined identifier, but for some reason multiple buttons send the same ID, even though in code they are not assigned the same ID. If anyone can offer some advice I'd appreciate it. Thanks!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.