rebuilt SDL-1.2 from latest mainstream code

This commit is contained in:
Ozkan Sezer 2021-01-01 15:23:40 +03:00
parent 1bb0584c34
commit bbda7657fe
11 changed files with 50 additions and 14 deletions

View file

@ -122,7 +122,7 @@
#define SDL_VIDEO_DRIVER_OS2FS 1
/* Enable OpenGL support */
/* Nothing yet for OS/2. */
/* #undef SDL_VIDEO_OPENGL */ /* Nothing yet */
/* Enable assembly routines where available */
#define SDL_ASSEMBLY_ROUTINES 1

View file

@ -94,6 +94,12 @@ static __inline__ Uint16 SDL_Swap16(Uint16 x)
__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
return (Uint16)result;
}
#elif defined(__GNUC__) && defined(__aarch64__)
static __inline__ Uint16 SDL_Swap16(Uint16 x)
{
__asm__("rev16 %w1, %w0" : "=r"(x) : "r"(x));
return x;
}
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
static __inline__ Uint16 SDL_Swap16(Uint16 x)
{
@ -135,6 +141,12 @@ static __inline__ Uint32 SDL_Swap32(Uint32 x)
__asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x));
return result;
}
#elif defined(__GNUC__) && defined(__aarch64__)
static __inline__ Uint32 SDL_Swap32(Uint32 x)
{
__asm__("rev %w1, %w0": "=r"(x):"r"(x));
return x;
}
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
static __inline__ Uint32 SDL_Swap32(Uint32 x)
{

View file

@ -27,7 +27,9 @@
#include "SDL_config.h"
#ifdef __WIN32__
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX
#define NOMINMAX /* Don't defined min() and max() */
#endif
@ -35,6 +37,7 @@
#endif
#ifndef NO_SDL_GLEXT
#define __glext_h_ /* Don't let gl.h include glext.h */
#define __gl_glext_h_ /* Don't let gl.h include glext.h */
#endif
#if defined(__MACOSX__)
#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
@ -48,6 +51,7 @@
#endif
#ifndef NO_SDL_GLEXT
#undef __glext_h_
#undef __gl_glext_h_
#endif
/** @name GLext.h
@ -57,8 +61,9 @@
*/
/*@{*/
#ifndef NO_SDL_GLEXT
#if !defined(__glext_h_) && !defined(GL_GLEXT_LEGACY)
#if !(defined(__glext_h_) || defined(__gl_glext_h_)) && !defined(GL_GLEXT_LEGACY)
#define __glext_h_
#define __gl_glext_h_
#ifdef __cplusplus
extern "C" {
@ -6227,12 +6232,12 @@ typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, const GLuint *);
GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
#endif
@ -6565,6 +6570,6 @@ typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid
}
#endif
#endif
#endif /* GL_GLEXT_LEGACY */
#endif /* NO_SDL_GLEXT */
/*@}*/

View file

@ -138,6 +138,7 @@ typedef struct SDL_Surface {
#define SDL_ANYFORMAT 0x10000000 /**< Allow any video depth/pixel-format */
#define SDL_HWPALETTE 0x20000000 /**< Surface has exclusive palette */
#define SDL_DOUBLEBUF 0x40000000 /**< Set up double-buffered video mode */
#define SDL_TRIPLEBUF 0x40000100 /**< Set up triple-buffered video mode */
#define SDL_FULLSCREEN 0x80000000 /**< Surface is a full screen display */
#define SDL_OPENGL 0x00000002 /**< Create an OpenGL rendering context */
#define SDL_OPENGLBLIT 0x0000000A /**< Create an OpenGL rendering context and use it for blitting */

Binary file not shown.

View file

@ -122,7 +122,7 @@
#define SDL_VIDEO_DRIVER_OS2FS 1
/* Enable OpenGL support */
/* Nothing yet for OS/2. */
/* #undef SDL_VIDEO_OPENGL */ /* Nothing yet */
/* Enable assembly routines where available */
#define SDL_ASSEMBLY_ROUTINES 1

View file

@ -94,6 +94,12 @@ static __inline__ Uint16 SDL_Swap16(Uint16 x)
__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
return (Uint16)result;
}
#elif defined(__GNUC__) && defined(__aarch64__)
static __inline__ Uint16 SDL_Swap16(Uint16 x)
{
__asm__("rev16 %w1, %w0" : "=r"(x) : "r"(x));
return x;
}
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
static __inline__ Uint16 SDL_Swap16(Uint16 x)
{
@ -135,6 +141,12 @@ static __inline__ Uint32 SDL_Swap32(Uint32 x)
__asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x));
return result;
}
#elif defined(__GNUC__) && defined(__aarch64__)
static __inline__ Uint32 SDL_Swap32(Uint32 x)
{
__asm__("rev %w1, %w0": "=r"(x):"r"(x));
return x;
}
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
static __inline__ Uint32 SDL_Swap32(Uint32 x)
{

View file

@ -27,7 +27,9 @@
#include "SDL_config.h"
#ifdef __WIN32__
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX
#define NOMINMAX /* Don't defined min() and max() */
#endif
@ -35,6 +37,7 @@
#endif
#ifndef NO_SDL_GLEXT
#define __glext_h_ /* Don't let gl.h include glext.h */
#define __gl_glext_h_ /* Don't let gl.h include glext.h */
#endif
#if defined(__MACOSX__)
#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
@ -48,6 +51,7 @@
#endif
#ifndef NO_SDL_GLEXT
#undef __glext_h_
#undef __gl_glext_h_
#endif
/** @name GLext.h
@ -57,8 +61,9 @@
*/
/*@{*/
#ifndef NO_SDL_GLEXT
#if !defined(__glext_h_) && !defined(GL_GLEXT_LEGACY)
#if !(defined(__glext_h_) || defined(__gl_glext_h_)) && !defined(GL_GLEXT_LEGACY)
#define __glext_h_
#define __gl_glext_h_
#ifdef __cplusplus
extern "C" {
@ -6227,12 +6232,12 @@ typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, const GLuint *);
GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
#endif
@ -6565,6 +6570,6 @@ typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid
}
#endif
#endif
#endif /* GL_GLEXT_LEGACY */
#endif /* NO_SDL_GLEXT */
/*@}*/

View file

@ -138,6 +138,7 @@ typedef struct SDL_Surface {
#define SDL_ANYFORMAT 0x10000000 /**< Allow any video depth/pixel-format */
#define SDL_HWPALETTE 0x20000000 /**< Surface has exclusive palette */
#define SDL_DOUBLEBUF 0x40000000 /**< Set up double-buffered video mode */
#define SDL_TRIPLEBUF 0x40000100 /**< Set up triple-buffered video mode */
#define SDL_FULLSCREEN 0x80000000 /**< Surface is a full screen display */
#define SDL_OPENGL 0x00000002 /**< Create an OpenGL rendering context */
#define SDL_OPENGLBLIT 0x0000000A /**< Create an OpenGL rendering context and use it for blitting */

Binary file not shown.

Binary file not shown.