I was wondering if there was any simple (or at least fairly basic) way to get input from a joystick or controller that's plugged into your computer. In Game Editor (a 2d game engine), you use two functions called: getjoystickbutton(int) and getjoystickaxis(int). These functions will return values such as whether a button is pressed or how far on the x axis a joystick has been moved. Is there a basic way for me to make similar functions? Thank you in advance =D
I was thinking about a game lib. But then I decided not to for the simple reason that I only want joystick support and I don't want to mess with graphics and stuff. But thank you for your tip. I'll definitely check it out later =D
If you are using Visual Studio 2010, your Windows SDK is current; no need for downloading. If you have Visual Studio 2008, your SDK is for Windows Vista; you should download the latest SDK.
I don't know if other compilers/IDE's come with the SDK or not, so to be on the safe side you might want to download it.
I am pretty sure that DirectInput is part of the DirectX SDK. The DirectX SDK may be a part of the windows sdk, but downloading it just for DirectInput seems a bit like a waste.
Oh, and there's really no easy way of getting Joystick input, even when you're using DirectInput (actually, especially when you're using DirectInput - it's not exactly straight forward).
Oh, and there's really no easy way of getting Joystick input, even when you're using DirectInput (actually, especially when you're using DirectInput - it's not exactly straight forward).