Skip to content

Commit

Permalink
faction picker: optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruwetuin committed Mar 31, 2024
1 parent 043786e commit 8f0041f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions luaui/Widgets/gui_factionpicker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ local sec = 0
function widget:Update(dt)
sec = sec + dt
if sec > 0.5 then
doUpdate = true
sec = 0
checkGuishader()

Expand Down Expand Up @@ -269,6 +268,7 @@ function widget:DrawScreen()
end
if doUpdate then
dlistFactionpicker = gl.DeleteList(dlistFactionpicker)
doUpdate = nil
end
if not dlistFactionpicker then
dlistFactionpicker = gl.CreateList(function()
Expand Down Expand Up @@ -296,7 +296,6 @@ function widget:DrawScreen()
end
font2:End()

doUpdate = nil
end

function widget:MousePress(x, y, button)
Expand Down

0 comments on commit 8f0041f

Please sign in to comment.