Controllers not detected when launching from Hyperspin. Works from RLUI.

windowlicker11

New member
RL Member
I am having an issue loading xpadder when launching from Hyperspin. For some reason my controllers are not getting detected so the profiles are not loading. Launching a game from RLUI works without issue.

Here is the Rocketlauncher log when launching from Hyperspin:
http://pastebin.com/nhEnzstD

Here is the Rocketlauncher log when launching from RLUI.
http://pastebin.com/GN88Wni4

The area of contention seems to be the detection of joysticks.
From Rocketlauncher log when launching with Hyperspin:
GetJoystickArray - Joysticks Detected: 0000000000000000

From Rocketlauncher log when launching with RLUI.
GetJoystickArray - Joysticks Detected: 1000000000000000

I have tried multiple controllers across multiple systems without resolve. I can't seem to pinpoint whether Hyperspin is causing this or if Rocketlauncher is acting differently when launching from Hyperspin. It may be completely independent from both for all I have been able to figure.

I should note that I am using Windows 10 as this issue started around the time I reluctantly switched from 7.


Here is a post on the Hyperspin forum with a similiar issue that was not resolved.
http://www.hyperspin-fe.com/topic/1...ns-xpadder-newbie-first-time-help/?hl=xpadder

Here is my Hyperspin log as well:
http://pastebin.com/XkvQ1Z6s
 

djvj

Administrator
Staff member
Developer
If RL is not seeing any joysticks in that binary array, nothing to really troubleshoot on the RL side. That's coming from Windows. You need to figure out why your joysticks are not showing up from HS.

Sent from my SM-N910V using Tapatalk
 

windowlicker11

New member
RL Member
Well I have it working, but I am really not sure if this is an appropriate solution as most of this is over my head.

I decided to take a look at the JoystickArray in Keymapper.ahk specifically the DLL call of the function joyGetPosEx in winmm.dll (line 299):
joyError := DllCall("winmm\joyGetPosEx", "ptr", port, "ptr", &joyState)

According to https://msdn.microsoft.com/en-us/library/windows/desktop/dd757108(v=vs.85).aspx the second parameter is a pointer to a JOYINFOEX structure and the members dwSize and dwFlags must be set otherwise joyGetPosEx will fail.

I set the size with this statement before the dll call:
NumPut(64, joyState, 0, "Uint")

And poof everything works.

Somehow when launching a game via RLUI there is a large nonzero value stored in dwSize, but when I launch via Hyperspin the value of dwSize is 0 thus causing joyGetPosEx to return an error. I am baffled by all of this.
 

djvj

Administrator
Staff member
Developer
That's interesting, I don't see why that would change either. RL has no idea where you are launching it from in that sense. It doesn't care, it treats all launches the same. I still don't see how this is related to RL at all because of this. Something else is causing that difference.
Do you have another pc still with something other than win10 you can test that NumGet on to make sure it works there as well? If it has no effect on anyone but fixes it in your situation, I don't mind adding it to the ahk. Just odd this hasn't come up yet for other win10 users.
 

windowlicker11

New member
RL Member
Ok so I tested this on Win7. I used the following code after the dll call to check what is stored in dwSize:
Num := NumGet(&joyState,0,"Uint")
msgbox, %Num%

There is a different value stored on each launch. Here are the results of three launches on Win7 using Hyperspin:
40688384
130153472
129969408

So with my Win7 machine xpadder launches fine without having to inject a value into dwSize.

When launched on Win10 with Hyperspin the value is always 0 and xpadder does not launch.

Here are the values when launched with RLUI on Win10:
145082624
52581888
143668992

Seems like Hyperspin is causing the issue on my Win10 machine. Since no one else has reported this I wouldn't change the ahk. I will use my fix on my end until I can further isolate the issue.
 

djvj

Administrator
Staff member
Developer
Thanks for the update. Very odd indeed. Keep me posted if you learn anything else.
 

Wizshaw

Member
Supporter
RL Member
Youre not the only one having issues with joystick detection. I had custom profiles for a couple emulators, ssf, nintendo ds, and american laser games. And the profiles used to load up fine, and they dont anymore. I have been trying to get them to work all night, tinkering with settings etc. Trying autohotkey setups, etc. And nothing.

Just throwing it out there.
 

mrsco

New member
wow. my xpadder magically stopped working in this same way and adding the
NumPut(64, joyState, 0, "Uint")
to my keymapper.ahk fixed it.... i'm still having the focus issue when quiting a game though... when it gets back to hyperspin its not in focus and i need to alt+tab or click mouse... so weird how this just broke all of a sudden. windows update maybe... im on win10 x64
 
Top