Skip to content

Commit

Permalink
only update the visible fieldvalues in classes
Browse files Browse the repository at this point in the history
  • Loading branch information
cheat-engine committed Mar 21, 2022
1 parent ac647db commit 6e918ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Cheat Engine/bin/autorun/dotnetinfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1553,13 +1553,14 @@ end


local function FieldValueUpdaterTimer(frmDotNetInfo, sender)
--todo: only update the visible entries
local i
local address=getAddressSafe(frmDotNetInfo.comboFieldBaseAddress.Text)
local Class=frmDotNetInfo.CurrentlyDisplayedClass
local value

if Class then
for i=0, frmDotNetInfo.lvStaticFields.Items.Count-1 do
if Class and frmDotNetInfo.lvStaticFields.TopItem~=nil then
for i=frmDotNetInfo.lvStaticFields.TopItem.Index, math.min(frmDotNetInfo.lvStaticFields.Items.Count-1, frmDotNetInfo.lvStaticFields.TopItem.Index+frmDotNetInfo.lvStaticFields.VisibleRowCount) do
local ci=frmDotNetInfo.lvStaticFields.Items[i].Data
if ci>0 and ci<=#Class.Fields then

Expand Down Expand Up @@ -1595,7 +1596,8 @@ local function FieldValueUpdaterTimer(frmDotNetInfo, sender)
end

if address and Class then
for i=0, frmDotNetInfo.lvFields.Items.Count-1 do
for i=frmDotNetInfo.lvFields.TopItem.Index, math.min(frmDotNetInfo.lvFields.Items.Count-1, frmDotNetInfo.lvFields.TopItem.Index+frmDotNetInfo.lvFields.VisibleRowCount) do
--for i=0, frmDotNetInfo.lvFields.Items.Count-1 do
local ci=frmDotNetInfo.lvFields.Items[i].Data
if ci>0 and ci<=#Class.Fields then
local a=address+Class.Fields[ci].Offset
Expand Down

0 comments on commit 6e918ae

Please sign in to comment.