use the new SDL_CreateThread call hedgeroid
authorXeli
Sat, 12 Nov 2011 17:55:23 +0100
branchhedgeroid
changeset 6336 cf4c65f9cbbe
parent 6334 b05d3af9a58e
child 6338 633af6fec34f
use the new SDL_CreateThread call
hedgewars/SDLh.pas
hedgewars/uAI.pas
--- a/hedgewars/SDLh.pas	Sat Nov 12 17:27:47 2011 +0100
+++ b/hedgewars/SDLh.pas	Sat Nov 12 17:55:23 2011 +0100
@@ -883,7 +883,7 @@
 procedure SDL_WM_SetCaption(title: PChar; icon: PChar); cdecl; external SDLLibName;
 function  SDL_WM_ToggleFullScreen(surface: PSDL_Surface): LongInt; cdecl; external SDLLibName;
 
-function  SDL_CreateThread(fn: pointer; data: pointer): PSDL_Thread; cdecl; external SDLLibName;
+function  SDL_CreateThread(fn: pointer; name: PChar; data: pointer): PSDL_Thread; cdecl; external SDLLibName;
 procedure SDL_WaitThread(thread: PSDL_Thread; status: PLongInt); cdecl; external SDLLibName;
 function  SDL_CreateMutex: PSDL_mutex; cdecl; external SDLLibName;
 procedure SDL_DestroyMutex(mutex: PSDL_mutex); cdecl; external SDLLibName;
--- a/hedgewars/uAI.pas	Sat Nov 12 17:27:47 2011 +0100
+++ b/hedgewars/uAI.pas	Sat Nov 12 17:55:23 2011 +0100
@@ -320,7 +320,7 @@
 //TODO: sdl_thread works on device but crashes in simulator, most likely because of outdated toolchain
 BeginThread(@Think, Me, ThinkThread);
 {$ELSE}
-ThinkThread := SDL_CreateThread(@Think, Me);
+ThinkThread := SDL_CreateThread(@Think, nil, Me);
 {$ENDIF}
 AddFileLog('Thread started');
 end;