Skip to content

Set controller support only at PLAYER_LOGIN - #24

Merged
ollidiemaus merged 1 commit into
mainfrom
fix/controller-support-blocked
Nov 7, 2026
Merged

ollidiemaus merged 1 commit into
mainfrom
fix/controller-support-blocked

Conversation

@ollidiemaus

Copy link
Copy Markdown
Owner

What changed

  • ApplyControllerSupportAtLogin runs at PLAYER_LOGIN and is now the only place that calls SetCVar on InputDeviceInterfaceStyle.
  • ApplyControllerSupport (part of EvaluateProfileState) no longer sets it. If the value still differs from the profile, it shows a reload popup that also points to Options > Controller. The reload runs the PLAYER_LOGIN step again.
  • If the login attempt is blocked, the popup says so.
  • PLAYER_LOGIN writes the resolution, the CVar value and the profile name to the debug log (/autosetup debug).
  • The verbose parameter is gone from ApplyControllerSupport.

Why

Logging in on the PC with console mode on raised ADDON_ACTION_BLOCKED for SetCVar(), 8 times so far, with every checked stack going through the EDIT_MODE_LAYOUTS_UPDATED handler. #22 only made the popup say the call was blocked; the error kept firing.

What a reviewer should know

  • The root cause is unknown. An intermediate build kept the evaluation's call as a fallback after trying at PLAYER_LOGIN. On that build the login step raised nothing and recorded no block, then the value differed when the layouts arrived and the evaluation's call was blocked. So it either saw nothing to change or was skipped. The debug line is there to find out which.
  • Behaviour change: a login where the value only differs after PLAYER_LOGIN now gets a popup rather than an attempted automatic switch. Switching can then take two reloads: one to set it, one to finish applying it.
  • Not tested in game. luacheck and luac -p pass. The PLAYER_LOGIN attempt could still be blocked, which would show the same error with PLAYER_LOGIN in the stack.

SetCVar on InputDeviceInterfaceStyle from the initial evaluation kept
raising ADDON_ACTION_BLOCKED (8 times), always from the
EDIT_MODE_LAYOUTS_UPDATED handler. Try it once at PLAYER_LOGIN instead.
The evaluation no longer sets it: it reports a value that still differs
with a reload popup, and the reload comes back through PLAYER_LOGIN.
Log the login values to the debug log, since why the value differs by
the evaluation is still unknown.
@ollidiemaus
ollidiemaus merged commit 545fe4f into main Nov 7, 2026
1 check passed
@ollidiemaus
ollidiemaus deleted the fix/controller-support-blocked branch November 7, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant