XInput test... please try and help out!

Blitz3D Forums/Blitz3D Programming/XInput test... please try and help out!

SLotman(Posted 2008) [#1]
I just wrote a userlib to deal with XInput. It should detect if you have DX9.0c or higher installed (must have xinput9_1_0.dll), and if you have, it shows a window with status to up 4 controllers.

Please, everyone test this if possible, even if you don´t have dx9 installed (or have dx10!), if you´re on win98/2k/etc - it should give an error if the correct dx version isnt found, and it *shouldnt* show a "userlib not found" problem.

If you have more than 1 xbox controller, let me know also if all of them are working correctly!

I plan on using this on my game, but I only have one x360 joy to test it , and not many computers to test it :(

the link to the test file: http://www.icongames.com.br/temp/xinput_test.zip

Thanks everyone!


mtnhome3d(Posted 2008) [#2]
It works on my wireless 360 pad, I'll test it with more than one pad later. I like that you have rumble working.
Are you planning on releasing this?
this works on all three of my pads


Riskjockey(Posted 2008) [#3]
This is really cool.
I just tested it with 2 wired controllers. Works perfectly. I'm using XP with directX9.
If you plan to release this to the general public then count me interested ;)


SLotman(Posted 2008) [#4]
Yes, I will release it :)

Just not right now, the code needs a little clean up, and I´m rushing to prepare my game to a game festival :)

But in December I should have some spare time to clean and publish it :)

Did anyone tested it on Windows Vista?


Stevie G(Posted 2008) [#5]
@ Slotman - do you plan to support all joypad types? Not everyone has an xbox360 so you're limiting you users / audience.


SLotman(Posted 2008) [#6]
In my game? Yes, for sure; normal joy access through normal b3d functions - but vibration will only happens on 360 pads :)

This userlib "test" is just for getting the response from 360 joys, nothing stops anyone on using normal joy commands together with it.


mtnhome3d(Posted 2008) [#7]
i ran it on vista and it worked flawlessly


Neochrome(Posted 2008) [#8]
nice bit of kit this!
well cool!


SLotman(Posted 2008) [#9]
Damn... ran into a BIG problem. Tried on a computer with DX9.0c, but without xinput9_1_0.dll, and the game crashed with userlib not found...

Is there anyway I can test for the presence of that dll without having windows freaking out on me because I´m trying to read \windows\system32?

...And to my hapiness, I have to solve this by tomorrow, the deadline for a game competition :(

I´m using now this small code.. can anyone test it for me to see if windows don´t get crazy, and if it works on Vista?

filename$=SystemProperty("windowsdir") + "system32\xinput9_1_0.dll"

If FileType(filename$)=1 Then Print "The file exists!"
If FileType(filename$)=0 Then Print "File not found!"
If FileType(filename$)=2 Then Print "This is a directory!"

Print "Press any key to quit."
Print filename$

WaitKey()



Thanks in advance to everyone...


Danny(Posted 2008) [#10]
I first ran the exe file above: Userlib Not found.
Then I ran the above snippet and I get a proper "File not Found!" message!

So yeah - I guess this last snippet works ;)

I'm running Windows XP proffesional (5.1) with DirectX 9.0c
And have no controllers or joysticks at all! :D

Danny
ps. Good luck tomorrow dude! ;)


SLotman(Posted 2008) [#11]
Thanks :)

Tomorrow is only the deadline to send my program... results will only be available after Nov 12 (hence why I´m taking so long to release this code heh)

I actually know that it works on XP - my fear is for Vista, that locks down the windows folder pretty bad... with some luck I´ll be able to test it tomorrow night at a friend's computer; I hope it works, because if not, it will be pretty close to the deadline to fix it and send a new "vista compatible" version :P


Danny(Posted 2008) [#12]
Here's another one I found out recently (others might have spotted this before??)

In XP as well as Vista, if you hit ctrl-alt-del on a machine that's "in a domain" you will get the window security dialogue (as opposed to just taskmanager). If you go out that dialogue/back to windows, BB will crash!

[correction]: I used FastImage.dll; BB would crash in my case, on anything that would draw/render something to the backbuffer that is between my 'EndDraw' command (fastimage.dll) and the Flip command.. If that's of any help to anyone..

D.


SLotman(Posted 2008) [#13]
Just to confirm: it worked like a charm on a Vista system, no "userlib not found" problem :)

And thank God, no complaint from UAC when I check if the dll is available on \%windir%\system32 (which now I know I've should used the b3d systemproperty(sysdir) instead :P)


Nate the Great(Posted 2008) [#14]
I don't get any errors but it can't detect my controller :(

Vista buisness doesn't seem to work with it :( sounds cool tho


SLotman(Posted 2008) [#15]
I don't get any errors but it can't detect my controller :(

You tried with a xbox 360 joystick and it didnt work? it found no controller at all???

Is your controller a wireless one?


SLotman(Posted 2008) [#16]
Heh! I´m posting directly from the event, and my game got 1st place! From 40 submitted games, they chose 10 finalists... and then submitted the games to "public voting", people tried all the games and voted for the best :)

A small image I took right now:



It's a racing game... with snails ;)

The game follows the "Mario kart" style, and this screen is the ending after you win a championship.

A lot still to be done in the game (like time trials)... but people do seem to like it - and most don't believe I did all by myself :)

Probably this weekend I'll publish de xbox360 userlib, for everyone to enjoy!