mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 22:20:31 +00:00
Fixup build for OSX.
This commit is contained in:
parent
a58676c9e1
commit
33ecedb462
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <OpenGL/OpenGL.h>
|
#include <OpenGL/OpenGL.h>
|
||||||
|
#include <OpenGL/gl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// SDL 1.2 is portable, sure, but you still need some platform specific workarounds ;)
|
// SDL 1.2 is portable, sure, but you still need some platform specific workarounds ;)
|
||||||
|
@ -74,6 +74,8 @@ typedef int16_t (*snes_input_state_t)(bool port, unsigned device, unsigned index
|
|||||||
unsigned snes_library_revision_major(void);
|
unsigned snes_library_revision_major(void);
|
||||||
unsigned snes_library_revision_minor(void);
|
unsigned snes_library_revision_minor(void);
|
||||||
|
|
||||||
|
const char *snes_library_id(void);
|
||||||
|
|
||||||
void snes_set_video_refresh(snes_video_refresh_t);
|
void snes_set_video_refresh(snes_video_refresh_t);
|
||||||
void snes_set_audio_sample(snes_audio_sample_t);
|
void snes_set_audio_sample(snes_audio_sample_t);
|
||||||
void snes_set_input_poll(snes_input_poll_t);
|
void snes_set_input_poll(snes_input_poll_t);
|
||||||
|
16
thread.c
16
thread.c
@ -26,6 +26,11 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __MACH__
|
||||||
|
#include <mach/clock.h>
|
||||||
|
#include <mach/mach.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
struct slock
|
struct slock
|
||||||
@ -166,7 +171,18 @@ void scond_wait(scond_t *cond, slock_t *lock)
|
|||||||
bool scond_wait_timeout(scond_t *cond, slock_t *lock, unsigned timeout_ms)
|
bool scond_wait_timeout(scond_t *cond, slock_t *lock, unsigned timeout_ms)
|
||||||
{
|
{
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
|
|
||||||
|
#ifdef __MACH__ // OSX doesn't have clock_gettime ... :(
|
||||||
|
clock_serv_t cclock;
|
||||||
|
mach_timespec_t mts;
|
||||||
|
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
|
||||||
|
clock_get_time(cclock, &mts);
|
||||||
|
mach_port_deallocate(mach_task_self(), cclock);
|
||||||
|
now.tv_sec = mts.tv_sec;
|
||||||
|
now.tv_nsec = mts.tv_nsec;
|
||||||
|
#else
|
||||||
clock_gettime(CLOCK_REALTIME, &now);
|
clock_gettime(CLOCK_REALTIME, &now);
|
||||||
|
#endif
|
||||||
|
|
||||||
now.tv_sec += timeout_ms / 1000;
|
now.tv_sec += timeout_ms / 1000;
|
||||||
now.tv_nsec += timeout_ms * 1000000L;
|
now.tv_nsec += timeout_ms * 1000000L;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user