• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code joystick_xpos no longer exists!

T

TheGrovesy

Guest
I have a simple game i was experimenting with in GM1.4 which allowed the player to control the game with a USB SNES controller. This was done using the function joystick_xpos (and joystick_ypos).

I have now ported this over to the trial version of GM2 but these functions no longer exist!

What should I be using instead?

Also, i noticed that in GM1.4 the function gamepad_get_device_count() returns 12 devices. However on the exact same system GM2 the function returns 448 devices!

Any help would be great.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
joystick_ functions were already deprecated in 1.4 -- gamepad_ functions work with DirectInput devices on slots 4..11.

However on the exact same system GM2 the function returns 448 devices!
That sounds like a bug. Try adding logging to a System event to check if anything is causing the gamepad to "duplicate" every frame or anything, and consider filing a bug if you can spot the pattern in what causes that.
 
Top