mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-17 16:58:13 +00:00
Removed SDL_bool in favor of plain bool
We require stdbool.h in the build environment, so we might as well use the plain bool type. If your environment doesn't have stdbool.h, this simple replacement will suffice: typedef signed char bool;
This commit is contained in:
@@ -54,7 +54,7 @@ void *SDL_GetTLS(SDL_TLSID *id)
|
||||
return storage->array[storage_index].data;
|
||||
}
|
||||
|
||||
SDL_bool SDL_SetTLS(SDL_TLSID *id, const void *value, SDL_TLSDestructorCallback destructor)
|
||||
bool SDL_SetTLS(SDL_TLSID *id, const void *value, SDL_TLSDestructorCallback destructor)
|
||||
{
|
||||
SDL_TLSData *storage;
|
||||
int storage_index;
|
||||
@@ -439,7 +439,7 @@ const char *SDL_GetThreadName(SDL_Thread *thread)
|
||||
}
|
||||
}
|
||||
|
||||
SDL_bool SDL_SetThreadPriority(SDL_ThreadPriority priority)
|
||||
bool SDL_SetThreadPriority(SDL_ThreadPriority priority)
|
||||
{
|
||||
return SDL_SYS_SetThreadPriority(priority);
|
||||
}
|
||||
@@ -483,12 +483,12 @@ void SDL_WaitSemaphore(SDL_Semaphore *sem)
|
||||
SDL_WaitSemaphoreTimeoutNS(sem, -1);
|
||||
}
|
||||
|
||||
SDL_bool SDL_TryWaitSemaphore(SDL_Semaphore *sem)
|
||||
bool SDL_TryWaitSemaphore(SDL_Semaphore *sem)
|
||||
{
|
||||
return SDL_WaitSemaphoreTimeoutNS(sem, 0);
|
||||
}
|
||||
|
||||
SDL_bool SDL_WaitSemaphoreTimeout(SDL_Semaphore *sem, Sint32 timeoutMS)
|
||||
bool SDL_WaitSemaphoreTimeout(SDL_Semaphore *sem, Sint32 timeoutMS)
|
||||
{
|
||||
Sint64 timeoutNS;
|
||||
|
||||
@@ -505,7 +505,7 @@ void SDL_WaitCondition(SDL_Condition *cond, SDL_Mutex *mutex)
|
||||
SDL_WaitConditionTimeoutNS(cond, mutex, -1);
|
||||
}
|
||||
|
||||
SDL_bool SDL_WaitConditionTimeout(SDL_Condition *cond, SDL_Mutex *mutex, Sint32 timeoutMS)
|
||||
bool SDL_WaitConditionTimeout(SDL_Condition *cond, SDL_Mutex *mutex, Sint32 timeoutMS)
|
||||
{
|
||||
Sint64 timeoutNS;
|
||||
|
||||
|
Reference in New Issue
Block a user