mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
Fixed compilation issues with GCC 4.0.1 PowerPC
This commit is contained in:
parent
d1c4215fb5
commit
0569acd5d6
2 changed files with 8 additions and 1 deletions
|
@ -41,6 +41,7 @@
|
|||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <OpenGL/OpenGL.h>
|
||||
#include <OpenGL/gl.h>
|
||||
|
||||
#include <SDL.h>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <assert.h>
|
||||
#include <sys/time.h>
|
||||
#include <pthread.h>
|
||||
#include <libkern/OSAtomic.h>
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
|
@ -92,7 +93,12 @@ void* TimerThreadFunc(void*)
|
|||
|
||||
if (!g_isTicFrozen)
|
||||
{
|
||||
__sync_add_and_fetch(&s_tics, 1);
|
||||
// The following GCC/Clang intrinsic can be used instead of OS X specific function:
|
||||
// __sync_add_and_fetch(&s_tics, 1);
|
||||
// Although it's not supported on all platform/compiler combination,
|
||||
// e.g. GCC 4.0.1 with PowerPC target architecture
|
||||
|
||||
OSAtomicIncrement32(&s_tics);
|
||||
}
|
||||
|
||||
s_timerStart = SDL_GetTicks();
|
||||
|
|
Loading…
Reference in a new issue