Skip to content

Reload by itself after the controller support switch; validate the resolution field - #25

Merged
ollidiemaus merged 1 commit into
mainfrom
fix/controller-auto-reload
Nov 10, 2026
Merged

ollidiemaus merged 1 commit into
mainfrom
fix/controller-auto-reload

Conversation

@ollidiemaus

Copy link
Copy Markdown
Owner

What changed

Controller support (WoW Forever)

  • The switch is still made at PLAYER_LOGIN, in both directions. When it took, the initial evaluation now reloads the UI by itself instead of showing "Reload once more to finish applying it".
  • No automatic reload in combat, and none in the session right after one. The reload leaves AutoSetupDB.reloadedForController, which the next session clears; if the switch doesn't survive the reload, the popup appears instead of a reload loop. Saved data from a newer AutoSetup or unreadable data can't carry the mark, so those sessions keep the popup too.
  • CVar writes (UI scale, controller support) go through C_CVar.SetCVar instead of the game's Lua SetCVar wrapper.

Options panel

  • Saving a profile strips whitespace from the resolution, lowercases the x and rejects anything that isn't WIDTHxHEIGHT. Before, 1920x1080 or 1920X1080 saved a profile that never matched.
  • Removed the InterfaceOptions fallbacks and the guards around helpers the core file always defines; both shipped flavors have Settings. .luacheckrc loses the three InterfaceOptions globals.

Why

An audit against the addon standards found BugGrabber logging ADDON_ACTION_BLOCKED for the controller-support SetCVar at login. taint.log shows only the addon's own call with no earlier taint, so nothing on our side can be cleaned up. The value still changes and the switch works after a reload, and it is needed for streaming to a Steam Deck, so the call stays and the error is accepted. The game's own checkbox reloads the UI when toggled although its Lua has no reload, which suggests the client does it inside the CVar change and refuses that part to an addon. That explanation is not confirmed.

For the reviewer

  • The blocked-action error will still be logged on every login where AutoSetup switches the setting. That is intended.
  • reloadedForController is a new optional top-level field in AutoSetupDB; absent means false, so there is no DB_VERSION bump.
  • luacheck and luac -p pass. Not tested in game yet.
  • An existing profile saved under a malformed resolution key is refused on edit-and-save until the resolution is corrected.

…solution field

Controller support is still set at PLAYER_LOGIN, in both directions. The game
logs ADDON_ACTION_BLOCKED for that SetCVar (taint.log: the addon's own call,
nothing tainted before it), but the value changes and the switch works after a
reload, so the call stays. When it took, the initial evaluation now reloads the
UI itself instead of asking for a second reload: not in combat, and not in the
session right after such a reload (AutoSetupDB.reloadedForController), so a
switch that doesn't survive the reload can't loop. Those cases keep the popup.

From the addon standards audit:
- CVar writes go through C_CVar.SetCVar, not the game's Lua wrapper.
- Saving a profile strips whitespace from the resolution, lowercases the x and
  rejects anything that isn't WIDTHxHEIGHT; such a profile never matched.
- Drop the InterfaceOptions fallbacks and the guards around helpers the core
  file always defines; both shipped flavors have Settings.
@ollidiemaus
ollidiemaus merged commit 5b8e772 into main Nov 10, 2026
1 check passed
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