Skip to content

Commit 3f46437

Browse files
Add SDL_thread.inc
1 parent 871556a commit 3f46437

File tree

3 files changed

+617
-0
lines changed

3 files changed

+617
-0
lines changed

units/SDL3.pas

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ interface
122122
{$I SDL_hidapi.inc} // 3.2.0
123123
{$I SDL_metal.inc} // 3.2.0
124124
{$I SDL_vulkan.inc} // 3.2.0
125+
{$I SDL_thread.inc} // 3.2.0
125126

126127

127128

@@ -337,5 +338,16 @@ function SDL_AtomicDecRef(a: PSDL_AtomicInt): cbool;
337338
SDL_AtomicDecRef:=(SDL_AddAtomicInt(a,-1)=1);
338339
end;
339340

341+
{ Macros from SDL_thread.h }
342+
function SDL_CreateThread(fn: TSDL_ThreadFunction; name: PAnsiChar; data: Pointer): PSDL_Thread;
343+
begin
344+
SDL_CreateThread:=SDL_CreateThreadRuntime(fn,name,data,TSDL_FunctionPointer(SDL_BeginThreadFunction),TSDL_FunctionPointer(SDL_EndThreadFunction));
345+
end;
346+
347+
function SDL_CreateThreadWithProperties(props: TSDL_PropertiesID): PSDL_Thread;
348+
begin
349+
SDL_CreateThreadWithProperties:=SDL_CreateThreadWithPropertiesRuntime(props,TSDL_FunctionPointer(SDL_BeginThreadFunction),TSDL_FunctionPointer(SDL_EndThreadFunction));
350+
end;
351+
340352
end.
341353

0 commit comments

Comments
 (0)