mirror of https://github.com/sm64pc/sm64pc.git
move SDL2 includes to source files for PPC
This commit is contained in:
parent
8e4a7b79db
commit
8de8d00a5d
4
Makefile
4
Makefile
|
@ -597,11 +597,7 @@ endif
|
|||
|
||||
# SDL can be used by different systems, so we consolidate all of that shit into this
|
||||
ifeq ($(SDL_USED),2)
|
||||
ifeq ($(PPC_OSX_BUILD),1)
|
||||
BACKEND_CFLAGS += -DHAVE_SDL2=1 `$(SDLCONFIG) --cflags` -I/usr/local/include
|
||||
else
|
||||
BACKEND_CFLAGS += -DHAVE_SDL2=1 `$(SDLCONFIG) --cflags`
|
||||
endif
|
||||
ifeq ($(WINDOWS_BUILD),1)
|
||||
BACKEND_LDFLAGS += `$(SDLCONFIG) --static-libs` -lsetupapi -luser32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion
|
||||
else
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#ifdef AAPI_SDL2
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <SDL2/SDL.h>
|
||||
#else
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
|
||||
#include "audio_api.h"
|
||||
|
||||
|
|
|
@ -3,12 +3,15 @@
|
|||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
// stdbool.h can not be defined (and does not need to be defined) on the below platform
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__) && !defined(__GNU__C)
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
#include <math.h>
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <SDL2/SDL.h>
|
||||
#else
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
|
||||
// Analog camera movement by Pathétique (github.com/vrmiguel), y0shin and Mors
|
||||
// Contribute or communicate bugs at github.com/vrmiguel/sm64-analog-camera
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
// stdbool.h can not be defined (and does not need to be defined) on the below platform
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__) && !defined(__GNU__C)
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <stdbool.h> #include <stdbool.h>
|
||||
#endif
|
||||
|
||||
|
@ -22,13 +22,25 @@
|
|||
# include <GL/glew.h>
|
||||
#endif
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <SDL2/SDL.h>
|
||||
#else
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES 1
|
||||
#ifdef USE_GLES
|
||||
# include <SDL2/SDL_opengles2.h>
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <SDL2/SDL_opengles2.h>
|
||||
#else
|
||||
# include <SDL2/SDL_opengl.h>
|
||||
#include <SDL_opengles2.h>
|
||||
#endif
|
||||
#else
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <SDL2/SDL_opengl.h>
|
||||
#else
|
||||
#include <SDL_opengl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "../platform.h"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
// stdbool.h can not be defined (and does not need to be defined) on the below platform
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__) && !defined(__GNU__C)
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
@ -18,15 +18,18 @@
|
|||
# define FOR_WINDOWS 0
|
||||
#endif
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#if FOR_WINDOWS || defined(OSX_BUILD)
|
||||
# define GLEW_STATIC
|
||||
# include <GL/glew.h>
|
||||
#endif
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES 1
|
||||
#include <SDL2/SDL_opengl.h>
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <SDL2/SDL.h>
|
||||
#else
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
|
||||
// redefine this if using a different GL loader
|
||||
#define mglGetProcAddress(name) SDL_GL_GetProcAddress(name)
|
||||
|
|
|
@ -13,12 +13,20 @@
|
|||
#define GL_GLEXT_PROTOTYPES 1
|
||||
#include <SDL2/SDL_opengl.h>
|
||||
#else
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <SDL2/SDL.h>
|
||||
#else
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
#define GL_GLEXT_PROTOTYPES 1
|
||||
|
||||
#ifdef OSX_BUILD
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <SDL2/SDL_opengl.h>
|
||||
#else
|
||||
#include <SDL_opengl.h>
|
||||
#endif
|
||||
#else
|
||||
#include <SDL2/SDL_opengles2.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -82,7 +82,11 @@ void sys_fatal(const char *fmt, ...) {
|
|||
#ifdef HAVE_SDL2
|
||||
|
||||
// we can just ask SDL for most of this shit if we have it
|
||||
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__)
|
||||
#include <SDL2/SDL.h>
|
||||
#else
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
|
||||
const char *sys_user_path(void) {
|
||||
static char path[SYS_MAX_PATH] = { 0 };
|
||||
|
|
|
@ -621,7 +621,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
// This function can not be found by MacPorts GCC 4.9 and needs to be explicitly stated
|
||||
#if defined(__APPLE__) && defined(__BIG_ENDIAN__) && defined(__GNU__C)
|
||||
#if defined(__APPLE__) && defined(__BIG_ENDIAN__)
|
||||
extern long long int llrint ( double x );
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue