Closed GrieferAtWork closed 11 years ago
The mistakes with the Pointers are corrected.
But TThreadID is in the system-unit of Delphi AND Lazarus, declared as THandle.
It is necessary because this function represents the declaration of _beginthreadex from the WIN32-API.
ok... Wonder why it gave me that compiler error... (using 'Embarcadero® RAD Studio 2010 Version 14.0.3615.26342' ^ taken from the info page)
Btw: it might be possible that TThreadID was only included in XE4 (see this doc: http://docwiki.embarcadero.com/Libraries/XE4/en/System.TThreadID) ^ I couldn't find an earlier documentation of that type
type TThreadID = Cardinal; ^ as seen in the doc mentioned above
And since my Delphi-version came before XE4, you might want to add this code:
{$IFDEF ver210} type TThreadID = Cardinal; //compatibility type for old delphi versions {$ENDIF}
well i've added this now for all delphi-version before XE2 (there it's declared) as Cardinal. thx.
file: sdl.pas | line: 457 ... var ThreadId: TThreadID ... You probably meant to write 'TSDL_ThreadID' instead of 'TThreadID'... though not sure, since I think that delphi had a type named that. But even if it did, its unit isn't declared in uses. So its throws an 'unnamed type' compiler exception.
file: sdl.pas | line: 1806 ... r: UInt8; g: UInt8; b: UInt8 ... since this is a getter, it needs a pointer (PUInt8)
file: sdl.pas | line: 1790 ... r: PUInt8; g: PUInt8; b: PUInt8 ... since this is a setter, it needs a non-pointer (UInt8)