From e8c0e53f68989326db95f04d0d1486468224191a Mon Sep 17 00:00:00 2001 From: Raymond Date: Sat, 10 Apr 2010 13:36:09 +0200 Subject: [PATCH] Fixed some issues with TTarget_Exported (hope so) --- Units/MMLAddon/PSInc/pscompile.inc | 2 +- Units/MMLAddon/mmlpsthread.pas | 3 +-- Units/MMLCore/iomanager.pas | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Units/MMLAddon/PSInc/pscompile.inc b/Units/MMLAddon/PSInc/pscompile.inc index 4bc1565..e203337 100644 --- a/Units/MMLAddon/PSInc/pscompile.inc +++ b/Units/MMLAddon/PSInc/pscompile.inc @@ -42,7 +42,7 @@ Sender.Comp.AddTypeS('TPointArrayArray','Array of TPointArray'); Sender.Comp.AddTypeS('TBmpMirrorStyle','(MirrorWidth,MirrorHeight,MirrorLine)'); Sender.Comp.AddTypeS('TMask','record White, Black : TPointArray; WhiteHi,BlackHi : integer; W,H : integer;end;'); Sender.Comp.addtypeS('PPoint','record R,T : extended; end;'); -Sender.Comp.AddTypeS('TTarget_Exported','record int1,int2,int3,int4,int5,int6,int7,int8,int9,int10,int11,int12,int13,int14:integer; end;'); +Sender.Comp.AddTypeS('TTarget_Exported','record int1,int2,int3,int4,int5,int6,int7,int8,int9,int10,int11,int12,int13,int14,int15:integer; end;'); Sender.Comp.AddTypes('TDTMPointDef', 'record x, y, Color, Tolerance, AreaSize, AreaShape: integer; end;'); Sender.Comp.AddTypes('TDTMPointDefArray', 'Array Of TDTMPointDef;'); diff --git a/Units/MMLAddon/mmlpsthread.pas b/Units/MMLAddon/mmlpsthread.pas index 3ecb9c2..cac484c 100644 --- a/Units/MMLAddon/mmlpsthread.pas +++ b/Units/MMLAddon/mmlpsthread.pas @@ -226,7 +226,6 @@ uses {$define extdecl := register} {$endif} - {Some General PS Functions here} procedure psWriteln(str : string); extdecl; begin @@ -936,7 +935,7 @@ begin interp_type(self.instance,'type T2DPointArray = array of array of TPoint;'); ; interp_type(self.instance,'type TPointArrayArray = T2DPointArray;'); - interp_type(self.instance,'type TTarget_Exported = record int1,int2,int3,int4,int5,int6,int7,int8,int9,int10,int11,int12,int13,int14:integer; end;'); + interp_type(self.instance,'type TTarget_Exported = record int1,int2,int3,int4,int5,int6,int7,int8,int9,int10,int11,int12,int13,int14, int15:integer; end;'); interp_type(self.instance,'type TMask = record White, Black : TPointArray; WhiteHi,BlackHi : integer; W,H : integer;end;'); interp_type(self.instance,'type TDTMPointDef = record x, y, Color, Tolerance, AreaSize, AreaShape: integer; end;'); interp_type(self.instance,'type TDTMPointDefArray = Array Of TDTMPointDef;'); diff --git a/Units/MMLCore/iomanager.pas b/Units/MMLCore/iomanager.pas index 818e443..f956898 100644 --- a/Units/MMLCore/iomanager.pas +++ b/Units/MMLCore/iomanager.pas @@ -219,7 +219,7 @@ interface {Basically like TEIOS_Client, only this is exported to some plugin, whilst TEIOS_Client is Imported Not all functions have to be 'set', it depends on the kind of target (Image/KeyMouse) } - TTarget_Exported = packed record + TTarget_Exported = record Target : Pointer; GetTargetDimensions: procedure(target: pointer; var w, h: integer); stdcall; @@ -467,6 +467,7 @@ end; function TIOManager_Abstract.ExportKeyMouseTarget: TTarget_Exported; begin + FillChar(result,sizeof(TTarget_Exported),0); with result do begin Target:= KeyMouse;