Replace SDL_Atomic by stdatomic from C11

There is no reason to use SDL atomics.
This commit is contained in:
Romain Vimont
2020-04-02 19:16:33 +02:00
parent bea1c11f8e
commit 54ccccd883
4 changed files with 31 additions and 18 deletions

View File

@@ -1,9 +1,9 @@
#ifndef FPSCOUNTER_H
#define FPSCOUNTER_H
#include <stdatomic.h>
#include <stdbool.h>
#include <stdint.h>
#include <SDL2/SDL_atomic.h>
#include <SDL2/SDL_mutex.h>
#include <SDL2/SDL_thread.h>
@@ -16,7 +16,7 @@ struct fps_counter {
// atomic so that we can check without locking the mutex
// if the FPS counter is disabled, we don't want to lock unnecessarily
SDL_atomic_t started;
atomic_bool started;
// the following fields are protected by the mutex
bool interrupted;