AshitaXI / Ashita

Issue tracker and wiki for the Ashita project.
https://ashitaxi.com/
7 stars 1 forks source link

Add Support For New Gamepad Guid Registry Key #50

Closed atom0s closed 1 year ago

atom0s commented 1 year ago

Feature Description

Tonight's (11.09.2023) retail update introduced several changes to the way the game client works with gamepads, as well as changes to the gamepad tool itself. The main feature of interest with this change is that the client can now specifically lock to a selected controller by its GUID.

The manner in which this has been implemented has added a new registry key padguid000 which will need to be added to Ashita to ensure it is also overridden by our boot configuration scripts.

Additional controller work may also be needed/desired depending on how other changes were implemented by SE.

atom0s commented 1 year ago

The FFXiPadConfig.exe tool has been modified with tonights retail update as well to allow it to run while the game is open. This change has modified the tool in a few ways:

  1. The gamepad tool is now allowed to be opened directly while the game is running. It will no longer error saying it cannot be opened while the game is running.
  2. The gamepad tool now has a new command line argument available: /game
  3. The FFXI client now has the ability to launch the gamepad tool directly while in-game.

When the client launches the FFXiPadConfig.exe tool, it does so with the new command line argument switch: /game

This causes the gamepad tool to specifically check and make sure the game is running. It does this by checking to see if it can find the PlayOnline or game client window via:

Due to the way it looks for the Final Fantasy XI window, it will always fail while using Ashita when you are fully logged into a character as we rename the window title to the character's name. This means the only time users can currently configure the gamepad while in-game is at the main menu screen using the configuration options menu there.

The FFXiPadConfig tool also has the following other command line arguments:

atom0s commented 1 year ago

The client and FFXiPadConfig.exe have been updated to be able to talk to each other (one-way) to inform the client when a settings change has been made within the pad config tool. If the FFXiPadConfig tool is launched by the client with the /game command line argument, then upon applying / saving new settings changes, it will send a user message to the FFXI client telling it to update its controller information.

This is done via sending the FFXI client the user message id of 0x800B.

SendMessageA(*((HWND *)v1 + 8), 0x800Bu, 0, 0);
atom0s commented 1 year ago

This is implemented and will be included in the next Ashita update.