[BUG] No compila en MacOS

This commit is contained in:
2021-12-04 14:21:46 +01:00
parent 7552136845
commit 8f06ad8dab
2 changed files with 6 additions and 2 deletions

View File

@@ -112,7 +112,7 @@ int main(int argc,char*argv[]) {
bool exit = false; bool exit = false;
SDL_Event mini_eve; SDL_Event mini_eve;
SDL_AudioSpec audioSpec{44100, AUDIO_S8, 1, 0, 512, 0, 0, audioCallback, NULL}; SDL_AudioSpec audioSpec = {44100, AUDIO_S8, 1, 0, 512, 0, 0, audioCallback, NULL};
mini_audio_device = SDL_OpenAudioDevice(NULL, 0, &audioSpec, NULL, 0); mini_audio_device = SDL_OpenAudioDevice(NULL, 0, &audioSpec, NULL, 0);
SDL_PauseAudioDevice(mini_audio_device, 0); SDL_PauseAudioDevice(mini_audio_device, 0);
@@ -294,6 +294,7 @@ float sgn(float x) {
} }
#ifndef __LINUX__ #ifndef __LINUX__
#ifndef __APPLE__
float ceil(float x) { float ceil(float x) {
return SDL_ceilf(x); return SDL_ceilf(x);
@@ -315,6 +316,7 @@ float sqrt(float x) {
return SDL_sqrtf(x); return SDL_sqrtf(x);
} }
#endif
#endif #endif
float max(float x, float y) { float max(float x, float y) {

View File

@@ -135,13 +135,15 @@ int time();
float flr(float x); float flr(float x);
float sgn(float x); float sgn(float x);
#ifndef __LINUX__ #ifdef __LINUX__
#ifdef __APPLE__
float ceil(float x); float ceil(float x);
float sin(float x); float sin(float x);
float cos(float x); float cos(float x);
float atan2(float dx, float dy); float atan2(float dx, float dy);
float sqrt(float x); float sqrt(float x);
#endif #endif
#endif
float max(float x, float y); float max(float x, float y);
float mid(float x, float y, float z); float mid(float x, float y, float z);