View Single Post
04/09/22, 11:06 AM   #1
Phinix
 
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 186
IsInGamepadPreferredMode vs. IsConsoleUI

Just wondering what is the difference and why do we have two separate functions to check this?

Are there cases where it is necessary to use one over the other?

I notice that EVENT_GAMEPAD_PREFERRED_MODE_CHANGED fires before the game has actually finished loading the alternate code for keyboard/gamepad resulting in calls to controls specific to one mode giving nil errors. This can be seen by setting a toggle for mode, loading in keyboard mode, then hitting the toggle key and running code in EVENT_GAMEPAD_PREFERRED_MODE_CHANGED that references a gamepad-specific UI frame immediately without a delay.

Does one of these commands only register true after the game has actually finished transitioning the UI code?

Should the event itself not actually fire until this code swap is complete?
  Reply With Quote