Skip to content

Commit c094a60

Browse files
committed
Merge pull request #114 from Free-Pascal-meets-SDL-Website/update-sdlthread
- Updates sdlthread.inc to version 2.26.2 (for the most part) - OS/2-block left out (was not translated beforehand)
2 parents 001edd9 + 80de970 commit c094a60

File tree

3 files changed

+334
-135
lines changed

3 files changed

+334
-135
lines changed

units/ctypes.inc

+12
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,18 @@ type
154154

155155
ppcuint8 = ^pcuint8;
156156

157+
{ "The following type designates an unsigned integer type [or signed respectivly]
158+
with the property that any valid pointer to void can be
159+
converted to this type, then converted back to a pointer
160+
to void, and the result will compare equal to the original
161+
pointer: uintptr_t"
162+
Source: https://pubs.opengroup.org/onlinepubs/000095399/basedefs/stdint.h.html
163+
}
164+
cuintptr_t = PtrUInt;
165+
{$EXTERNALSYM cuintptr_t}
166+
cintptr_t = PtrInt;
167+
{$EXTERNALSYM cintptr_t}
168+
157169
{$IFDEF WANT_CWCHAR_T}
158170
(* wchar_t is the "wide character" type of the C language.
159171
* The size of this type is platform- and compiler-dependent.

units/sdl2.pas

+11-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ interface
131131
{$I sdlerror.inc} // 2.0.14
132132
{$I sdlplatform.inc} // 2.0.14
133133
{$I sdlpower.inc} // 2.0.14
134-
{$I sdlthread.inc}
134+
{$I sdlthread.inc} // 2.30.2
135135
{$I sdlatomic.inc} // 2.0.20
136136
{$I sdlmutex.inc} // 2.26.5
137137
{$I sdltimer.inc} // 2.0.18
@@ -220,11 +220,20 @@ function SDL_Button(X: cint): cint;
220220
{$IFDEF WINDOWS}
221221
//from "sdl_thread.h"
222222

223-
function SDL_CreateThread(fn: TSDL_ThreadFunction; name: PAnsiChar; data: Pointer): PSDL_Thread; overload;
223+
function SDL_CreateThread(fn: TSDL_ThreadFunction; name: PAnsiChar;
224+
data: Pointer): PSDL_Thread; overload;
224225
begin
225226
Result := SDL_CreateThread(fn,name,data,nil,nil);
226227
end;
227228

229+
function SDL_CreateThreadWithStackSize(fn: TSDL_ThreadFunction;
230+
name: PAnsiChar; const stacksize: csize_t; data: Pointer
231+
): PSDL_Thread; overload;
232+
begin
233+
Result := SDL_CreateThreadWithStackSize(
234+
fn,name,stacksize,data,nil,nil);
235+
end;
236+
228237
{$ENDIF}
229238

230239
//from "sdl_rect.h"

0 commit comments

Comments
 (0)