Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Nightstorm on March 25, 2017, 11:09:35 am

Title: TrackIR not working in recent builds
Post by: Nightstorm on March 25, 2017, 11:09:35 am
Good afternoon,

I just tried out my TrackIR with the latest nightly 3/21 and it's not functional.  It turns off the ability to pan around the cockpit but doesn't work by itself.  I've not discovered yet which version is last worked in, but I can confirm it was working on 7/14/16 release.

I'm using the 64 bit build so I'll test with 32 bit next.
Title: Re: TrackIR not working in recent builds
Post by: m!m on March 25, 2017, 11:11:45 am
64-bit builds are not supported by the TrackIR system at the moment.
Title: Re: TrackIR not working in recent builds
Post by: Nightstorm on March 25, 2017, 11:18:54 am
That would explain why it works in the 32 bit build.  However the central HUD was "jittery"  It kept bouncing around a little bit like it was trying to center.  The slewable parts all follow your head movement just fine and I noticed that it now has the zoom capability which is very cool :)
Title: Re: TrackIR not working in recent builds
Post by: chief1983 on March 30, 2017, 02:43:02 pm
I had hoped to follow up with the 64-bit DLL after we got the data we needed upon request in #974 (https://github.com/scp-fs2open/fs2open.github.com/issues/974) but have kept being busy with other things.  But the info that should be needed to build a 64-bit DLL is available to any other dev interested in trying.
Title: Re: TrackIR not working in recent builds
Post by: Cobra on April 01, 2017, 01:27:58 am
That would explain why it works in the 32 bit build.  However the central HUD was "jittery"  It kept bouncing around a little bit like it was trying to center.  The slewable parts all follow your head movement just fine and I noticed that it now has the zoom capability which is very cool :)

I actually pointed out an issue where the cockpit was glued to the viewpoint, so moving my head forward and to the sides would move the cockpit along with it, and I think that was shortly after release.

And yeah, the central HUD's going to be jittery. You kind of get used to it. I think it's the only HUD element that isn't slaved to the viewpoint, and even with the generous deadzone you get the rest of the HUD does kind of wiggle.
Title: Re: TrackIR not working in recent builds
Post by: Nightstorm on April 01, 2017, 08:39:57 am
The 32 bit version seems to be working fine for me.  I did edit my own HUD table so that the rest of the elements are bound to the view point, so that eliminated that distraction for me.  It would be great to have a 64 bit version though!  If anyone has the time to take that on that would be much appreciated by many I would think :)
Title: Re: TrackIR not working in recent builds
Post by: Cobra on April 01, 2017, 11:20:54 am
The 32 bit version seems to be working fine for me.  I did edit my own HUD table so that the rest of the elements are bound to the view point, so that eliminated that distraction for me.

...Unless you have cockpits on, not having the reticle stationary is gonna make it really hard to, like, aim.
Title: Re: TrackIR not working in recent builds
Post by: Nightstorm on May 16, 2017, 08:13:40 am
I'm using it in Diaspora, so there are cockpits.  However, I see you're point if you didn't have them.

If anyone gets a chance to work on the 64 bit DLL I'd be happy to help test it.
Title: Re: TrackIR not working in recent builds
Post by: m!m on May 16, 2017, 03:21:44 pm
I compiled the 64-bit DLL. Here is a download link: http://www.mediafire.com/file/ad4h9x8ji061h89/scptrackir.zip

I haven't tested it so it might crash. This will only work with 64-bit builds but if the DLL works, I'll change the filename so you can have both 32 and 64-bit DLLs at the same time.
Title: Re: TrackIR not working in recent builds
Post by: Nightstorm on May 16, 2017, 03:24:57 pm
I will give it a try and report back.  Thanks!
Title: Re: TrackIR not working in recent builds
Post by: Nightstorm on May 16, 2017, 08:23:09 pm
Well, it didn't crash.  But it didn't do anything either.  I tried both the x64 latest nightly and the RC1 candidate.  It simply acted as before on x64 and ignored it.
Title: Re: TrackIR not working in recent builds
Post by: m!m on May 17, 2017, 01:53:05 am
It could be a problem with the actual TrackIR DLL then. The current code doesn't use a different API DLL when in 64-bit mode so that will probably cause issue.

Do you have a log file? That might give me a clearer indication of what exactly is going wrong.

Furthermore, could you post the registry values found in "CURRENT_USER\Software\NaturalPoint\NATURALPOINT\NPClient Location"? If there is a "Path" key, could you also check that directory and post a list of the files in it? Maybe the 64-bit DLL just has a different name...
Title: Re: TrackIR not working in recent builds
Post by: Cobra on May 17, 2017, 02:26:56 am
There's an NPClient.dll and NPClient64.dll. Maybe make sure it's not NPClient.dll that's being referenced or however that works?
Title: Re: TrackIR not working in recent builds
Post by: m!m on May 17, 2017, 02:28:31 am
That's probably what I need. I'll try to make the changes and compile a new DLL later today.
Title: Re: TrackIR not working in recent builds
Post by: m!m on May 17, 2017, 03:03:19 pm
New DLL version is here: http://www.mediafire.com/file/knvo4mpdseg85pb/scptrackir.zip
Title: Re: TrackIR not working in recent builds
Post by: Cobra on May 17, 2017, 03:18:29 pm
That did the trick. :D
Title: Re: TrackIR not working in recent builds
Post by: chief1983 on May 17, 2017, 03:22:06 pm
Way to go m!m.  Is there anything else missing from 64bit builds on Windows now, compared to their 32bit counterparts?
Title: Re: TrackIR not working in recent builds
Post by: Nightstorm on May 18, 2017, 07:43:22 am
Works great thank you!
Title: Re: TrackIR not working in recent builds
Post by: Nightstorm on May 01, 2018, 05:38:40 pm
Hello there.  It seems at some point in the new builds TrackIR x64 stopped working again.

I have the 5/17/17 dll in place but no TrackIR any longer.  It would be great to get that back :D

Thanks!
Title: Re: TrackIR not working in recent builds
Post by: chief1983 on May 01, 2018, 10:23:35 pm
Ah yes, our regularly scheduled annual TrackIR breakage.  May warrant a Github issue if we want to go through official channels this time, unless someone has a quick hunch.
Title: Re: TrackIR not working in recent builds
Post by: m!m on May 02, 2018, 02:52:38 am
Hello there.  It seems at some point in the new builds TrackIR x64 stopped working again.

I have the 5/17/17 dll in place but no TrackIR any longer.  It would be great to get that back :D

Thanks!
Please post your fs2_open.log file.  Instructions on how to do this can be found in this post.
Title: Re: TrackIR not working in recent builds
Post by: Nightstorm on May 02, 2018, 04:57:17 am
I am running a customized build testing various things, though it was working fine last year with the older builds.  If needed I can go back and try and find when/where it quit working.

[attachment stolen by Russian hackers]
Title: Re: TrackIR not working in recent builds
Post by: m!m on May 02, 2018, 05:03:11 am
Unfortunately, that log does not reach the point where FSO tries to start TrackIR. You need to let the game initialize completely.
Title: Re: TrackIR not working in recent builds
Post by: Nightstorm on May 02, 2018, 05:13:47 am
Here you go, this one is all the way until I was in mission and launched.

Padlock still works but no TrackIR.




Initializing head tracking...
Failed to load library 'scptrackir64.dll': 'Failed loading scptrackir64.dll: The specified module could not be found.
'
TrackIR Init Failed - -1
    Failed to initialize 'TrackIR': Failed to initialize TrackIR.
Found FreeTrack provider 'FreeTrack' with version 1.0.0.0.
    Successfully initialized 'FreeTrack'
Creating player for movie


That's not the name of the DLL from last year, it's scptrackir.dll.  I'll try renaming it.


*That was easy.  Sorry to bother.  Works fine when it's named scptrackir64.dll.

[attachment stolen by Russian hackers]
Title: Re: TrackIR not working in recent builds
Post by: m!m on May 02, 2018, 05:25:16 am
Quote
Failed loading scptrackir64.dll: The specified module could not be found.
Just to make sure we didn't miss anything obvious here, are you sure that scptrackir64.dll is in the right location?
Title: Re: TrackIR not working in recent builds
Post by: Nightstorm on May 02, 2018, 05:47:56 am
Sorry I updated my previous post, in the release last year the x86 and x64 dll's were named the same.  The new build was looking for it to have 64 on the end of the name.  Simply renaming the dll resolved the issue.

The debug log pointed out exactly what the issue was.  I should have checked there first.

Thanks,
Title: Re: TrackIR not working in recent builds
Post by: m!m on May 02, 2018, 05:53:21 am
The 3.8 release post has the new DLLs with the correct names so you can use that instead of manually renaming the DLLs.