ev1313 / Pascal-SDL-2-Headers

These are the Pascal SDL 2 Headers.
Mozilla Public License 2.0
114 stars 48 forks source link

Typos 2 #3

Closed GrieferAtWork closed 11 years ago

GrieferAtWork commented 11 years ago

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)

ev1313 commented 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.

GrieferAtWork commented 11 years ago

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}

ev1313 commented 11 years ago

well i've added this now for all delphi-version before XE2 (there it's declared) as Cardinal. thx.