Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

API to switch controller profiles externally #40

Open
ThirteenAG opened this issue Nov 12, 2022 · 2 comments
Open

API to switch controller profiles externally #40

ThirteenAG opened this issue Nov 12, 2022 · 2 comments

Comments

@ThirteenAG
Copy link

I actually have something like this here, but better approach would be something like

                        if (CharDriving())
                            XIDI_API_SET_PROFILE(L"InCar");
                        else if (CharOnFoot())
                            XIDI_API_SET_PROFILEL("OnFoot");
                        else
                            XIDI_API_SET_PROFILE(L"Custom");

inside another plugin.

@samuelgr
Copy link
Owner

That is an interesting idea. I saw your modifications and started thinking about making an API for it, just like you suggested. I am trying to think of other possible uses for a Xidi API for patch/plugin developers, and it is something that could realistically be part of a future version.

@joao678
Copy link

joao678 commented May 18, 2024

I actually have something like this here, but better approach would be something like

                        if (CharDriving())
                            XIDI_API_SET_PROFILE(L"InCar");
                        else if (CharOnFoot())
                            XIDI_API_SET_PROFILEL("OnFoot");
                        else
                            XIDI_API_SET_PROFILE(L"Custom");

inside another plugin.

I was able to acomplish pretty much the exact same thing you want in a different approach, by using an external program, in the fork I've made, you can feed data directly into Xidi here
I was able to test this with FlatOut2. The game does not have menu controls for gamepads, however I was able to make a little program that reads data from controllers using SDL2 and read the game's memory to send different data to Xidi depending on the current situation

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants