Repository navigation
Set controller support only at PLAYER_LOGIN - #24
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
ApplyControllerSupportAtLoginruns atPLAYER_LOGINand is now the only place that callsSetCVaronInputDeviceInterfaceStyle.ApplyControllerSupport(part ofEvaluateProfileState) 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 thePLAYER_LOGINstep again.PLAYER_LOGINwrites the resolution, the CVar value and the profile name to the debug log (/autosetup debug).verboseparameter is gone fromApplyControllerSupport.Why
Logging in on the PC with console mode on raised
ADDON_ACTION_BLOCKEDforSetCVar(), 8 times so far, with every checked stack going through theEDIT_MODE_LAYOUTS_UPDATEDhandler. #22 only made the popup say the call was blocked; the error kept firing.What a reviewer should know
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.PLAYER_LOGINnow gets a popup rather than an attempted automatic switch. Switching can then take two reloads: one to set it, one to finish applying it.luacheckandluac -ppass. ThePLAYER_LOGINattempt could still be blocked, which would show the same error withPLAYER_LOGINin the stack.