direct input hook

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderators: Darksaber, General_Trageton, Forceflow, DTM, JeremyaFr

Post Reply

direct input hook

marcop000
Cadet 3rd Class
Posts: 36
Joined: Fri Dec 27, 2019 7:08 pm

Post by marcop000 » Fri Mar 20, 2020 5:02 pm

Hi,

I have multiple controllers (cloche, thottle, pedals) and becouse the game don't support multiple controllers I use vjoy to merge it on one virtual controller.

This work, but the compromise is that I lose to force feedback becouse the game send the ffb to vjoy and not to real device.

I ask if there is way to "redirect" all ffb data to the first controller that support the force feedback that can be different from the device used to control the ship.

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2223
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Mar 20, 2020 8:10 pm

Hello,
You can try this patch:

Code: Select all

At offset 034A3E, replace 33C05E83C410C2080090 with 33C0405E83C410C20800.
I have not tested it.
If it works, I will create a hook for that.

marcop000
Cadet 3rd Class
Posts: 36
Joined: Fri Dec 27, 2019 7:08 pm

Post by marcop000 » Sat Mar 21, 2020 3:44 pm

hi JeremyaFr,

thanks for your reply !!!

To be honest I don't have skill to create a hook.

I do only do a small change on some code in c++ but not more.

I suppose this is a binany change of dinput.dll. Is true ?

Do you have the possibility to send me the compiled dll or other to allow me to see if work ?

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2223
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Mar 21, 2020 4:08 pm

Hello,
A simple way to apply the patch is to use XwaExePatcher.

Open "patcher.xml" with Notepad and add that:

Code: Select all

  <Patch Name ="force feedback">
    <Item Offset="034A3E" From="33C05E83C410C2080090" To="33C0405E83C410C20800"/>
  </Patch>
Then run "XwaExePatcherWindow.exe", select "XWingAlliance.exe", and click on "Apply" next to the added "force feedback". The patch will be applied to "XWingAlliance.exe".

marcop000
Cadet 3rd Class
Posts: 36
Joined: Fri Dec 27, 2019 7:08 pm

Post by marcop000 » Sat Mar 21, 2020 5:22 pm

hi JeremyaFr,

Many many thanks !!

Your patch work pefect at the first attemp and very easy to apply.

Thanks again ...

I don't known if this is the right place to ask:

Do you know where there are the lastest complete full dynamic cockpit with hypespace for x-wing , a-wing, etc..

(If possible ready to use)

User avatar
blue_max
Lieutenant
XWAU Member
Posts: 941
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sun Mar 22, 2020 5:11 am

marcop000 wrote:
Sat Mar 21, 2020 5:22 pm
Do you know where there are the lastest complete full dynamic cockpit with hypespace for x-wing , a-wing, etc..
You're probably looking for the VR mod. The latest public release is here:

https://www.dropbox.com/s/3dz5egxfboeg4 ... 1.zip?dl=0

Be aware that this version is not compatible with hook_d3d.dll. So if you update all the hooks, you'll have to disable that one.

marcop000
Cadet 3rd Class
Posts: 36
Joined: Fri Dec 27, 2019 7:08 pm

Post by marcop000 » Sun Mar 22, 2020 8:36 am

Hi blue_max,

I looking for this:

https://www.youtube.com/watch?v=9BBFVMD-PrU

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2223
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Mar 29, 2020 4:53 pm

Hello,
Here is something to test.

I've included the joystick selected into a hook.

EDIT: link removed

This hook permits to select the joystick device with force feedback.

To select a joystick with force feedback, set JoystickDeviceIndex in "hook_joystick_ff.cfg".

The format is:
JoystickDeviceIndex = device index

The default value is 0, which select the first device.
When the value is -1, the last device will be selected.

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2223
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Apr 04, 2020 4:07 pm

UPDATE

Hello,
I've uploaded the xwa_hook_joystick_ff hook to OneDrive and GitHub.

You can download it with XwaHooksSetup.

User avatar
ual002
Lieutenant JG
Galactic Empire
Posts: 591
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Thu Apr 09, 2020 4:09 am

Wait, so does this mean my x56 rhino will work now?
For the glory of his majesty Emperor Palpatine! Image Image Image Image

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2223
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Apr 09, 2020 10:26 am

The best way to know the answer is to test.

User avatar
ual002
Lieutenant JG
Galactic Empire
Posts: 591
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Thu Apr 09, 2020 6:28 pm

Everybody coaxing me back into the fray it seems. lol
For the glory of his majesty Emperor Palpatine! Image Image Image Image

Post Reply