DirectX Gamepad Input

Pages: 12
I decided to try making my own controller mapping utility because the ones I've been able to find haven't worked and I figured it would be nice to be able to have my own features.

I was naturally pointed in the direction of DirectInput and looked into it. I tried making a program that just ran the EnumDevices command. It said that it couldn't find dinput.h, so I copied it from a site that multiple places linked to and made the header file, but on closer inspection, it doesn't even have some of the phrases that the msdn site refers to.

I also tried HSFM but it became clear early on that that wouldn't work either, and I'd ultimately like to stick to things that are part of Windows.

A direction to look in to find an up to date version of dinput.h would be helpful, but any help I can get on reading controller inputs would also be appreciated.

At the moment, I'd like to be able to get to the point where I can make a program that tells me what button I'm pressing.
Which controller?
It's an adapter for a PS1 dualshock I got off of amazon.
https://www.amazon.com/Dual-Controller-Adapter-Converter-Playstation-2/dp/B001AATQ0Y

Like I've said, I haven't found anything that works with it so I don't know how much help this will be.
Try Opengl instead of DirectX
Worked for me!!!



Sorry for my late reply, had my half semester exams. Hope you'd forgive me.
Thank you. I'll give it a try.

Also, don't worry about it. It's not like you owe me anything.
I'm sorry, but do you think you could be more specific about what you meant by using Opengl? I tried going to google with it but I didn't really get any results that gave me much of a direction.
I meant that you could change your game engine(DirectX) to another game engine(Opengl)
Cause Opengl is lot more easier to use than DirectX and you can get as much support from the net as you want. Cause DirectX programmers don't really prefer sharing their lengthy and complex projects.
Which C++ IDE do you use?
If you are interested in it, you can go to http://lazyfoo.net/ to set up the game engine and create 2d games and basic operations(note: there was definitely a game controller tutorial)

and if you think you're ready enough to do some hardcore programming, you can make 3d games too from this tutorial site:

http://www.lighthouse3d.com
Thank you, but I think there's been a bit of a misunderstanding on what I'm ultimately trying to do here. I'm wanting to make a utility that reads gamepad input and then simulates keyboard input. I've more or less figured out the keyboard part, it's just the identifying and reading gamepads.

The reason I'm wanting to do this is because I have an unusual gamepad that doesn't seem to work with any mapping utility I've been able to find (at least not in a way that I want). I also thought it would be nice to build in my own features, such as incrementing/decrementing sequences.

Thank you.

Oh also, I'm using codeblocks (mingw based) as I'm a bit of a cheapskate.
Oh! I get it. So you're making a custom function I guess?
I use CodeBlocks(gcc mingw 64 compiler) too, my most favorite ide we can surely help each other.
It's not that bad the way you're describing it.
Did you download the dll files responsible for the working of the functions?
I hope your DirectX engine is up to date too, cause that might be the reason why it is unable to read most of the phrase.
Or try deleting the uncompilable lines in the header file instead.
What is HSFM anyways?
I'm actually not entirely sure what HSFM is to be honest. I checked it out because I saw it recommended somewhere but I never got too into it. Also, I checked and I seem to be on version 10 even though I should have 12 since I updated to Windows 10... There doesn't seem to be a way to update it, either, from what I can find.
OK. Did the dinput.h file work for you?
I got the same error as before, but snooping around in the header itself and there is an "EnumDevices" phrase but for some reason it doesn't get recognized when I try to use it in main. There's a 5 variable "IDirectInput8_EnumDevices" that does get recognized, but I don't know what the extra variable means and haven't been able to find any resources on it.
Pages: 12