• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › General Discussion v
« Previous 1 ... 10 11 12 13 14 ... 365 Next »

REQUEST - Use X1nput instead of Xinput
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
REQUEST - Use X1nput instead of Xinput
03-09-2021, 02:43 AM
#1
SaladCesar Offline
Junior Member
**
Posts: 4
Threads: 1
Joined: Mar 2021
Hi,

I would like to make a suggestion for Dolphin.

I began to search how I could use Dolphin to use the trigger rumble of my Xbox Controller (Xbox Controllers have 4 rumble motors. 2 in each handle, 2 in each triggers). I searched a lot and even asked on reddit : https://www.reddit.com/r/DolphinEmulator/comments/m0iwom/how_could_i_use_the_trigger_rumble_motors_of_my/

But I didn't find how to do that. Finally, I found this information :
https://www.pcgamingwiki.com/wiki/Controller:Xbox_Wireless_Controller#Impulse_Trigger_Vibration

" The impulse triggers of the controller are two independent rumble motors located within each of the triggers, allowing developers to selectively vibrate the trigger when the player is performing an action that warrants such a feedback, such as firing a gun or charging an attack.
The XInput API does not expose this functionality. Games making use of the rumble motors uses the Windows.Gaming.Input API instead.
The third-party DLL injection-based tool X1nput can be used to convert the normal vibrations of a game to impulse trigger vibration in many single player games."

OK, so I went to try X1nput : https://github.com/araghon007/X1nput

I followed the instructions on the website, and after using Process Explorer I am sure that Dolphin uses XInput1_4.dll x64. By default, it uses the one in System32. I wanted to try replacing it by X1nput.

But when trying to put it in Dolphin's folder, this happens :
[Image: kkSFptX.png]

It looks like the controller appears as disconnected when using X1nput instead of Xinput.
I think that Dolphin is simply not compatible with X1nput.

My request is :
Could it be possible for Dolphin to use X1nput instead of Xinput in the future builds ? It looks like I can't do that by myself and it would be better for everyone to use X1nput. Better control for Xbox controllers.

Thanks in advance for any answer, have a good day
Find
Reply
03-09-2021, 07:47 PM (This post was last modified: 03-09-2021, 07:48 PM by MayImilae.)
#2
MayImilae Offline
Ambassador of Niche Platform Support
**********
Administrators
Posts: 4,438
Threads: 116
Joined: Mar 2011
We are currently looking into Windows XInput replacement, Windows.Gaming.Input (yes, really, it's called that). That exposes the dual motors, as well as a lot more functionality like 8 simultaneous controllers.
[Image: RPvlSEt.png]
Windows 10 x64 | Core i9-9900k | NVIDIA GeForce RTX 3090 EVGA FTW3 Ultra| 32GB DDR4-3000 | Asus Xonar Essence STX on Logitech Z-2300 | Logitech G903 Hero
MacBook Pro 14in | M1 Max (32 GPU Cores) | macOS 12 | 64GB LPDDR5 6400
Find
Reply
03-09-2021, 08:22 PM
#3
SaladCesar Offline
Junior Member
**
Posts: 4
Threads: 1
Joined: Mar 2021
(03-09-2021, 07:47 PM)MayImilae Wrote: We are currently looking into Windows XInput replacement, Windows.Gaming.Input (yes, really, it's called that). That exposes the dual motors, as well as a lot more functionality like 8 simultaneous controllers.

That's wonderful ! Is there a way I could try that, if a nightly build had been released with windows.gaming.input ?
I would be happy to help with testing if needed.
Find
Reply
03-10-2021, 08:37 AM
#4
mbc07 Offline
Wiki Caretaker
*******
Content Creators (Moderators)
Posts: 3,510
Threads: 46
Joined: Dec 2010
It's a bit outdated, but you can download an experimental build with that feature here. Scroll down to the bottom, then, on the box where it says "all checks passed", click on the "details" link from pr-win-x64, that will direct you to our buildbot where you can download the build...
Avell A70 MOB: Core i7-11800H, GeForce RTX 3060, 16 GB DDR4-3200, Windows 11 (Insider Preview)
ASRock Z97M OC Formula: Pentium G3258, GeForce GT 440, 16 GB DDR3-1600, Windows 10 (21H2)
Find
Reply
03-10-2021, 08:17 PM (This post was last modified: 03-10-2021, 08:44 PM by SaladCesar.)
#5
SaladCesar Offline
Junior Member
**
Posts: 4
Threads: 1
Joined: Mar 2021
(03-10-2021, 08:37 AM)mbc07 Wrote: It's a bit outdated, but you can download an experimental build with that feature here. Scroll down to the bottom, then, on the box where it says "all checks passed", click on the "details" link from pr-win-x64, that will direct you to our buildbot where you can download the build...

Thanks, I just downloaded the dev build.

But in the Vibration settings, I only have the motors R and L appearing like on the master release :
[Image: SUyJ784.png]

Is there a way I could add the trigger motors ? Maybe they don't appear in the choice but can be used in the form below. But I don't know how they are called. Motor TR and Motor TL ? Do you have infos on that ?

Thanks in advance for any answer and have a great day

EDIT : I found how to use the trigger rumble, I just had to select WGInput in the drop down menu. So it works ! I have access to the trigger rumble ! Thanks a lot for your help.

But I would have a little question :

Is there a way I could use sin() and cos() functions to modulate rumbles in amplitude ? Is there a time variable that can be used ?


[Image: 0kSPW9O.png]



My dream would be to be able to modulate the rumbles, using functions with a time variable. Is that possible ?
Find
Reply
03-10-2021, 10:37 PM (This post was last modified: 03-10-2021, 11:32 PM by filoppi.)
#6
filoppi Offline
Junior Member
**
Posts: 4
Threads: 1
Joined: Jun 2020
(03-10-2021, 08:17 PM)SaladCesar Wrote: Thanks, I just downloaded the dev build.

But in the Vibration settings, I only have the motors R and L appearing like on the master release :
[Image: SUyJ784.png]

Is there a way I could add the trigger motors ? Maybe they don't appear in the choice but can be used in the form below. But I don't know how they are called. Motor TR and Motor TL ? Do you have infos on that ?

Thanks in advance for any answer and have a great day

EDIT : I found how to use the trigger rumble, I just had to select WGInput in the drop down menu. So it works ! I have access to the trigger rumble ! Thanks a lot for your help.

But I would have a little question :

Is there a way I could use sin() and cos() functions to modulate rumbles in amplitude ? Is there a time variable that can be used ?


[Image: 0kSPW9O.png]



My dream would be to be able to modulate the rumbles, using functions with a time variable. Is that possible ?

No you can not dynamically modify the output (rumble) value, you can only linearly scale it with the range setting. You cannot use functions in outputs as of now.
Also the syntax would have to be "sin(`Motor R`)", not the one you wrote.
That said, that wouldn't be hard to implement, but it's such a specific thing to ask, that no one probably event thought about it.

Edit: if you actually want the sin to be driven by time, that is not possibly and probably will never be, as time based functions aren't available in outputs.
Find
Reply
03-11-2021, 01:51 AM
#7
SaladCesar Offline
Junior Member
**
Posts: 4
Threads: 1
Joined: Mar 2021
(03-10-2021, 10:37 PM)filoppi Wrote: No you can not dynamically modify the output (rumble) value, you can only linearly scale it with the range setting. You cannot use functions in outputs as of now.
Also the syntax would have to be "sin(`Motor R`)", not the one you wrote.
That said, that wouldn't be hard to implement, but it's such a specific thing to ask, that no one probably event thought about it.

Edit: if you actually want the sin to be driven by time, that is not possibly and probably will never be, as time based functions aren't available in outputs.

Ok I understand. Thanks. I think I should give up on sin and cos functions then.
What do you mean by "the range setting" ? How could I use that ?
Find
Reply
03-11-2021, 06:12 AM
#8
filoppi Offline
Junior Member
**
Posts: 4
Threads: 1
Joined: Jun 2020
(03-11-2021, 01:51 AM)SaladCesar Wrote: Ok I understand. Thanks. I think I should give up on sin and cos functions then.
What do you mean by "the range setting" ? How could I use that ?

It's the slider on top top of the window, it's defaulted to 100.
Find
Reply
03-11-2021, 10:04 AM (This post was last modified: 03-11-2021, 10:08 AM by Billiard26.)
#9
Billiard26 Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 2,659
Threads: 8
Joined: Feb 2010
You can reference outputs within other input expressions.
This is currently the only way to make use of functions to set your rumble strength.

First reference a variable within your "Motor" output mapping to acquire the value set by the game:
[Image: csU25ga.png]
Then you can hijack any input mapping to make use of that variable:
[Image: iexib9D.png]

Note the entire expression must be on one line for it to save properly.
Note the use of the comma operator. `Click 1` is my normal mapping for this input.

I am aware of how hacky this is, but it's as good as you get currently.
There are some plans to make this better in the future.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode