mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-29 18:11:38 +00:00
Rename SDL semaphore and condition variable functions to match SDL 3.0 naming convention
Fixes https://github.com/libsdl-org/SDL/issues/7642
This commit is contained in:
@@ -64,7 +64,7 @@ static int SDLCALL SDL_HIDAPI_RumbleThread(void *data)
|
||||
while (SDL_AtomicGet(&ctx->running)) {
|
||||
SDL_HIDAPI_RumbleRequest *request = NULL;
|
||||
|
||||
SDL_SemWait(ctx->request_sem);
|
||||
SDL_WaitSemaphore(ctx->request_sem);
|
||||
|
||||
SDL_LockMutex(SDL_HIDAPI_rumble_lock);
|
||||
request = ctx->requests_tail;
|
||||
@@ -107,7 +107,7 @@ static void SDL_HIDAPI_StopRumbleThread(SDL_HIDAPI_RumbleContext *ctx)
|
||||
if (ctx->thread) {
|
||||
int result;
|
||||
|
||||
SDL_SemPost(ctx->request_sem);
|
||||
SDL_PostSemaphore(ctx->request_sem);
|
||||
SDL_WaitThread(ctx->thread, &result);
|
||||
ctx->thread = NULL;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ int SDL_HIDAPI_SendRumbleWithCallbackAndUnlock(SDL_HIDAPI_Device *device, const
|
||||
/* Make sure we unlock before posting the semaphore so the rumble thread can run immediately */
|
||||
SDL_HIDAPI_UnlockRumble();
|
||||
|
||||
SDL_SemPost(ctx->request_sem);
|
||||
SDL_PostSemaphore(ctx->request_sem);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user