Skip to content

Commit

Permalink
fix SDL sema
Browse files Browse the repository at this point in the history
  • Loading branch information
erique committed Mar 31, 2024
1 parent 3bad0a4 commit b063d34
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@

void uae_sem_destroy(uae_sem_t* sem) {
if (*sem) {
SDL_DestroySemaphore((SDL_sem*)sem);
SDL_DestroySemaphore((SDL_sem*)(*sem));
*sem = nullptr;
}
}

int uae_sem_trywait(uae_sem_t* sem) {
return SDL_SemTryWait((SDL_sem*)sem);
return SDL_SemTryWait((SDL_sem*)(*sem));
}

int uae_sem_trywait_delay(uae_sem_t* sem, int ms) {
return SDL_SemWaitTimeout((SDL_sem*)sem, ms);
return SDL_SemWaitTimeout((SDL_sem*)(*sem), ms);
}

void uae_sem_post(uae_sem_t* sem) {
SDL_SemPost((SDL_sem*)sem);
SDL_SemPost((SDL_sem*)(*sem));
}

void uae_sem_unpost(uae_sem_t*) {
Expand All @@ -33,7 +33,7 @@ void uae_sem_unpost(uae_sem_t*) {
}

void uae_sem_wait(uae_sem_t* sem) {
SDL_SemWait((SDL_sem*)sem);
SDL_SemWait((SDL_sem*)(*sem));
}

void uae_sem_init(uae_sem_t* sem, int manual_reset, int initial_state) {
Expand Down

0 comments on commit b063d34

Please sign in to comment.