Fixed bug #741
The thread ID is an unsigned long so it can hold pthread_t so people can do naughty things with it. I'm going to be adding additional useful thread API functions, but this should prevent crashes in people's existing code on 64-bit architectures. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404327
This commit is contained in:
parent
83fbb6981f
commit
3f0f9188ed
23 changed files with 53 additions and 51 deletions
|
@ -62,7 +62,7 @@ static struct
|
|||
|
||||
/* Thread functions */
|
||||
static SDL_Thread *SDL_EventThread = NULL; /* Thread handle */
|
||||
static Uint32 event_thread; /* The event thread id */
|
||||
static SDL_threadID event_thread; /* The event thread id */
|
||||
|
||||
void
|
||||
SDL_Lock_EventThread(void)
|
||||
|
@ -183,7 +183,7 @@ SDL_StopEventThread(void)
|
|||
}
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_threadID
|
||||
SDL_EventThreadID(void)
|
||||
{
|
||||
return (event_thread);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
/* Useful functions and variables from SDL_events.c */
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_mouse_c.h"
|
||||
#include "SDL_keyboard_c.h"
|
||||
#include "SDL_windowevents_c.h"
|
||||
|
@ -34,7 +35,7 @@ extern void SDL_QuitInterrupt(void);
|
|||
|
||||
extern void SDL_Lock_EventThread(void);
|
||||
extern void SDL_Unlock_EventThread(void);
|
||||
extern Uint32 SDL_EventThreadID(void);
|
||||
extern SDL_threadID SDL_EventThreadID(void);
|
||||
|
||||
extern int SDL_SendSysWMEvent(SDL_SysWMmsg * message);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue