mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-12-18 11:52:23 -05:00
641ae70ab9
* Replace Windows CriticalSection with SDL Mutex * Update README.md
26 lines
432 B
C++
26 lines
432 B
C++
#ifndef MXSEMAPHORE_H
|
|
#define MXSEMAPHORE_H
|
|
|
|
#include "mxtypes.h"
|
|
|
|
#include <SDL3/SDL_mutex.h>
|
|
|
|
// VTABLE: LEGO1 0x100dccf0
|
|
// SIZE 0x08
|
|
class MxSemaphore {
|
|
public:
|
|
MxSemaphore();
|
|
|
|
// FUNCTION: LEGO1 0x100c87e0
|
|
~MxSemaphore() { SDL_DestroySemaphore(m_semaphore); }
|
|
|
|
virtual MxResult Init(MxU32 p_initialCount, MxU32 p_maxCount);
|
|
|
|
void Wait();
|
|
void Release();
|
|
|
|
private:
|
|
SDL_Semaphore* m_semaphore;
|
|
};
|
|
|
|
#endif // MXSEMAPHORE_H
|