Go to Page... |
|
Thread Tools | Display Modes |
10-13-16, 09:52 PM | #1 |
Graphics auto-setting to highest setting (and temporary workaround)
...
For temporary workaround snippet/macro go to the bottom The Bug Occasionally, when making any changes in the VideoOptionsFrame (Game Menu > System) such as changes to Sound or Graphics, clicking "Okay" or "Apply" will cause all Graphics Quality settings to be set to their max values. Recreating the Bug
Source of the Bug This bug comes from the fact that a "Custom" graphics setting is treated as GraphicsQuality = 11. A "Custom" graphics setting is one where an individual dropdown or slider has been changed from the value set by the large Graphics Quality slider. A small text that says "Custom" will be visible just below the Graphics Quality slider when you do this. Running Graphics_Quality:GetValue() will return 11. When a user clicks CANCEL or ESC from the VideoOptionsFrame, it calls VideoOptionsPanel_Cancel(Graphics_) https://github.com/tomrus88/Blizzard...anels.lua#L311 which loops through all the controls of Graphics_ and runs ControlSetValue(control, control.value) https://github.com/tomrus88/Blizzard...anels.lua#L323 ControlSetValue basically just does control:SetValue(control.value) to set controls back to their previous values. The problem is that when Graphics_Quality is set to "11" for a custom setting, running ControlSetValue on it sets Graphics_Quality to "10" which is max graphics settings. This new max setting isn't applied until the next time the user presses OKAY or APPLY. Some Further Details The reason that recreating the bug above requires two cycles of clicking CANCEL is that ControlSetValue uses Graphics_Quality.value which is not always the same as Graphics_Quality:GetValue(). When changing a "Custom" setting, Graphics_Quality:GetValue() will immediately change to "11" while Graphics_Quality.value will remain what it was (e.g. 1). The first time you press CANCEL in the above example, Graphics_Quality:GetValue() remains 11 while Graphics_Quality.value is set to "nil". When you next click on SYSTEM, it sets Graphics_Quality.value = Graphics_Quality:GetValue(), so now Graphics_Quality.value is "11". Clicking CANCEL a 2nd time will cause ControlSetValue to write this "11" to Graphics_Quality resulting in max graphics settings which will be applied next time you press APPLY or OKAY. Use this little snippet to see how these two values change while you do this. The first displayed number is Graphics_Quality:GetValue() and the second is Graphics_Quality.value. Lua Code:
Temporary Workaround My poor laptop can't handle the max graphics settings so I'm using this snippet as a simple workaround Lua Code:
This workaround leverages this conditional in the "onvaluechanged" method of Graphics_Quality https://github.com/tomrus88/Blizzard...Levels.lua#L97 Here's the workaround as a macro for those that prefer it Code:
/run hooksecurefunc("VideoOptionsPanel_Cancel",function(s)local g=Graphics_Quality local n=s:GetName()if s:GetName()=="Display_" then g.noclick=true elseif s:GetName()=="Graphics_" then g.noclick=false end end) Last edited by whatisxml : 10-16-16 at 09:16 AM. |
|
WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » Graphics auto-setting to highest setting (and temporary workaround) |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Switch to Hybrid Mode |
Threaded Mode |
|
|