From b4ef45b2ee115db5dc65f7cb6560a2165ea2e79e Mon Sep 17 00:00:00 2001 From: Dark Byte Date: Mon, 19 Dec 2016 00:38:39 +0100 Subject: [PATCH] fix some really old code no one ever checked and go backwards --- Cheat Engine/MainUnit.pas | 42 +++++++++++++++++++++++++----------- Cheat Engine/addresslist.pas | 4 ++-- Cheat Engine/docs/todo.txt | 10 +++++++-- 3 files changed, 40 insertions(+), 16 deletions(-) diff --git a/Cheat Engine/MainUnit.pas b/Cheat Engine/MainUnit.pas index 627d316739..32a1a094ba 100644 --- a/Cheat Engine/MainUnit.pas +++ b/Cheat Engine/MainUnit.pas @@ -7480,15 +7480,28 @@ procedure TMainForm.rbDecClick(Sender: TObject); end; procedure TMainForm.Cut2Click(Sender: TObject); +var e: TEdit; begin - if scanvalue.SelLength > 0 then - scanvalue.CutToClipboard; + e:=nil; + if scanvalue.Focused then e:=scanvalue; + if (scanvalue2<>nil) and scanvalue2.Focused then e:=scanvalue2; + if e=nil then exit; + + if e.SelLength > 0 then + e.CutToClipboard; end; procedure TMainForm.Copy2Click(Sender: TObject); +var e: tedit; begin - if scanvalue.SelLength > 0 then - scanvalue.CopyToClipboard; + e:=nil; + if scanvalue.Focused then e:=scanvalue; + if (scanvalue2<>nil) and scanvalue2.Focused then e:=scanvalue2; + + if e=nil then exit; + + if e.SelLength > 0 then + e.CopyToClipboard; end; procedure TMainForm.Paste2Click(Sender: TObject); @@ -7497,18 +7510,23 @@ procedure TMainForm.Paste2Click(Sender: TObject); Text: string; i: integer; allow: boolean; + e: tedit; begin cb := tclipboard.Create; - if cb.HasFormat(CF_TEXT) then - begin - if scanvalue.Focused then - scanvalue.PasteFromClipboard; + try + if cb.HasFormat(CF_TEXT) then + begin + e:=nil; + if scanvalue.Focused then e:=scanvalue; + if (scanvalue2<>nil) and scanvalue2.Focused then e:=scanvalue2; - if (scanvalue2 <> nil) and (scanvalue2.Focused) then - scanvalue2.PasteFromClipboard; - end; + if e=nil then exit; - cb.Free; + e.PasteFromClipboard; + end; + finally + cb.Free; + end; end; procedure TMainForm.checkpaste; diff --git a/Cheat Engine/addresslist.pas b/Cheat Engine/addresslist.pas index 45bbbcd167..3812663ffd 100644 --- a/Cheat Engine/addresslist.pas +++ b/Cheat Engine/addresslist.pas @@ -1925,7 +1925,7 @@ procedure TAddresslist.AdvancedCustomDrawItem(Sender: TCustomTreeView; Node: TTr t:=memrec.AsyncProcessingTime mod 1000; //every time t=0 the line should be up (value 0) t:=trunc(t*0.36); //every second is a full rotation - x:=cx+cos(pi*(270+t mod 360)/180)*r; + x:=cx+cos(pi*(270+t mod 360)/180)*r*ifthen(memrec.Active,-1,1); y:=cy+sin(pi*(270+t mod 360)/180)*r; sender.Canvas.Line(cx,cy,trunc(x),trunc(y)); @@ -1939,7 +1939,7 @@ procedure TAddresslist.AdvancedCustomDrawItem(Sender: TCustomTreeView; Node: TTr t:=(memrec.AsyncProcessingTime div 1000) mod 60; //every 60 seconds (t=0) the second handle should be up t:=t*6; - x:=cx+cos(pi*(270+t mod 360)/180)*r; + x:=cx+cos(pi*(270+t mod 360)/180)*r*ifthen(memrec.Active,-1,1); y:=cy+sin(pi*(270+t mod 360)/180)*r; sender.Canvas.Line(cx,cy,trunc(x),trunc(y)); diff --git a/Cheat Engine/docs/todo.txt b/Cheat Engine/docs/todo.txt index bf6056aa91..0e2b434920 100644 --- a/Cheat Engine/docs/todo.txt +++ b/Cheat Engine/docs/todo.txt @@ -2,7 +2,7 @@ process/system info: resizing is shitty kernel: Add an noexception method that will stop all exceptions kernel: When using the processwatcher obtain handles for them on creation (use circular buffer and keep track which ones ce has opened) -ceshare: continue with it + lua: Add the openFile equivalent for openProcess to lua @@ -16,4 +16,10 @@ memscan: Add a wincp scan option to text scans symbol condig window: tab 0 isn't on the symbolname -lua:autoassembler: Make autoAssembler return the alloclist which can then be passed to disable scripts \ No newline at end of file +lua:autoassembler: Make autoAssembler return the alloclist which can then be passed to disable scripts + +linux: make a 32-bit linux build with .so injection support + +replace: selection only + +ceshare: continue with it \ No newline at end of file