isle-portable/LEGO1/omni/include/mxcriticalsection.h
Christian Semmler 641ae70ab9 Replace Windows CriticalSection with SDL Mutex ()
* Replace Windows CriticalSection with SDL Mutex

* Update README.md
2024-06-25 19:51:12 +02:00

25 lines
581 B
C++

#ifndef MXCRITICALSECTION_H
#define MXCRITICALSECTION_H
#include <SDL3/SDL_mutex.h>
// SIZE 0x1c
class MxCriticalSection {
public:
MxCriticalSection();
~MxCriticalSection();
static void SetDoMutex();
void Enter();
void Leave();
private:
// [library:synchronization]
// SDL uses the most efficient mutex implementation available on the target platform.
// Originally this class allowed working with either a Win32 CriticalSection or Mutex,
// but only CriticalSection was ever used and we don't need both anyway.
SDL_Mutex* m_mutex;
};
#endif // MXCRITICALSECTION_H