1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-05 22:02:38 +00:00

Eliminating obsolete #ifdefs and friends (#26)

The following options have been applied globally, using unifdef(1):
```c
 #undef BBGE_BUILD_DIRECTX

 #define BBGE_BUILD_OPENGL 1
 #define GL_GLEXT_LEGACY   1
 #define HAVE_PUTENV       1
 #define TIXML_USE_STL     1
 #define BBGE_BUILD_SDL    1
```
This commit is contained in:
Nicolas Braud-Santoni 2016-05-05 03:49:41 +02:00 committed by False.Genesis
commit 276265be1d
54 changed files with 1 additions and 2248 deletions

View file

@ -1,37 +1,28 @@
#include "MT.h"
#include "Base.h"
#ifdef BBGE_BUILD_SDL
// --------- Lockable ----------
Lockable::Lockable()
: _mtx(NULL)
{
#ifdef BBGE_BUILD_SDL
_mtx = SDL_CreateMutex();
#endif
}
Lockable::~Lockable()
{
#ifdef BBGE_BUILD_SDL
SDL_DestroyMutex((SDL_mutex*)_mtx);
#endif
}
void Lockable::lock()
{
#ifdef BBGE_BUILD_SDL
SDL_LockMutex((SDL_mutex*)_mtx);
#endif
}
void Lockable::unlock()
{
#ifdef BBGE_BUILD_SDL
SDL_UnlockMutex((SDL_mutex*)_mtx);
#endif
}
// --------- Waitable ----------
@ -39,37 +30,26 @@ void Lockable::unlock()
Waitable::Waitable()
: _cond(NULL)
{
#ifdef BBGE_BUILD_SDL
_cond = SDL_CreateCond();
#endif
}
Waitable::~Waitable()
{
#ifdef BBGE_BUILD_SDL
SDL_DestroyCond((SDL_cond*)_cond);
#endif
}
void Waitable::wait()
{
#ifdef BBGE_BUILD_SDL
SDL_CondWait((SDL_cond*)_cond, (SDL_mutex*)mutex());
#endif
}
void Waitable::signal()
{
#ifdef BBGE_BUILD_SDL
SDL_CondSignal((SDL_cond*)_cond);
#endif
}
void Waitable::broadcast()
{
#ifdef BBGE_BUILD_SDL
SDL_CondBroadcast((SDL_cond*)_cond);
#endif
}
#endif // BBGE_BUILD_SDL