2
0
Fork 0
mirror of https://github.com/Shpoike/Quakespasm.git synced 2025-03-10 12:01:43 +00:00

rebuilt SDL2 for Win from mainstream SDL repo, hg-12425:266c5fbe0bbd

rebuilt SDL2 for OSX from mainstream SDL repo, hg-12428:f5d2abe5af7f


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1606 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2018-11-22 14:57:24 +00:00
parent 06b09262bf
commit 2288b9c757
32 changed files with 529 additions and 31 deletions

View file

@ -101,6 +101,15 @@ SDL_MostSignificantBitIndex32(Uint32 x)
#endif
}
SDL_FORCE_INLINE SDL_bool
SDL_HasExactlyOneBitSet32(Uint32 x)
{
if (x && !(x & (x - 1))) {
return SDL_TRUE;
}
return SDL_FALSE;
}
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}

View file

@ -50,12 +50,9 @@
#elif defined(__MINGW64_VERSION_MAJOR)
#include <intrin.h>
#else
#ifdef __ALTIVEC__
#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
#include <altivec.h>
#undef pixel
#undef bool
#endif
#endif
#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
#include <arm_neon.h>

View file

@ -1043,6 +1043,31 @@ extern "C" {
*/
#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
/**
* \brief A variable controlling whether the 2D render API is compatible or efficient.
*
* This variable can be set to the following values:
*
* "0" - Don't use batching to make rendering more efficient.
* "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
*
* Up to SDL 2.0.9, the render API would draw immediately when requested. Now
* it batches up draw requests and sends them all to the GPU only when forced
* to (during SDL_RenderPresent, when changing render targets, by updating a
* texture that the batch needs, etc). This is significantly more efficient,
* but it can cause problems for apps that expect to render on top of the
* render API's output. As such, SDL will disable batching if a specific
* render backend is requested (since this might indicate that the app is
* planning to use the underlying graphics API directly). This hint can
* be used to explicitly request batching in this instance. It is a contract
* that you will either never use the underlying graphics API directly, or
* if you do, you will call SDL_RenderFlush() before you do so any current
* batch goes to the GPU before your work begins. Not following this contract
* will result in undefined behavior.
*/
#define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
/**
* \brief An enumeration of hint priorities
*/

View file

@ -168,7 +168,7 @@ enum
((format) && (SDL_PIXELFLAG(format) != 1))
/* Note: If you modify this list, update SDL_GetPixelFormatName() */
enum
typedef enum
{
SDL_PIXELFORMAT_UNKNOWN,
SDL_PIXELFORMAT_INDEX1LSB =
@ -290,7 +290,7 @@ enum
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
};
} SDL_PixelFormatEnum;
typedef struct SDL_Color
{

View file

@ -40,7 +40,7 @@ extern "C" {
#endif
/**
* \brief The structure that defines a point
* \brief The structure that defines a point (integer)
*
* \sa SDL_EnclosePoints
* \sa SDL_PointInRect
@ -52,7 +52,20 @@ typedef struct SDL_Point
} SDL_Point;
/**
* \brief A rectangle, with the origin at the upper left.
* \brief The structure that defines a point (floating point)
*
* \sa SDL_EnclosePoints
* \sa SDL_PointInRect
*/
typedef struct SDL_FPoint
{
float x;
float y;
} SDL_FPoint;
/**
* \brief A rectangle, with the origin at the upper left (integer).
*
* \sa SDL_RectEmpty
* \sa SDL_RectEquals
@ -67,6 +80,19 @@ typedef struct SDL_Rect
int w, h;
} SDL_Rect;
/**
* \brief A rectangle, with the origin at the upper left (floating point).
*/
typedef struct SDL_FRect
{
float x;
float y;
float w;
float h;
} SDL_FRect;
/**
* \brief Returns true if point resides inside a rectangle.
*/

View file

@ -835,6 +835,148 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
const SDL_Point *center,
const SDL_RendererFlip flip);
/**
* \brief Draw a point on the current rendering target.
*
* \param renderer The renderer which should draw a point.
* \param x The x coordinate of the point.
* \param y The y coordinate of the point.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,
float x, float y);
/**
* \brief Draw multiple points on the current rendering target.
*
* \param renderer The renderer which should draw multiple points.
* \param points The points to draw
* \param count The number of points to draw
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,
const SDL_FPoint * points,
int count);
/**
* \brief Draw a line on the current rendering target.
*
* \param renderer The renderer which should draw a line.
* \param x1 The x coordinate of the start point.
* \param y1 The y coordinate of the start point.
* \param x2 The x coordinate of the end point.
* \param y2 The y coordinate of the end point.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,
float x1, float y1, float x2, float y2);
/**
* \brief Draw a series of connected lines on the current rendering target.
*
* \param renderer The renderer which should draw multiple lines.
* \param points The points along the lines
* \param count The number of points, drawing count-1 lines
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,
const SDL_FPoint * points,
int count);
/**
* \brief Draw a rectangle on the current rendering target.
*
* \param renderer The renderer which should draw a rectangle.
* \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,
const SDL_FRect * rect);
/**
* \brief Draw some number of rectangles on the current rendering target.
*
* \param renderer The renderer which should draw multiple rectangles.
* \param rects A pointer to an array of destination rectangles.
* \param count The number of rectangles.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,
const SDL_FRect * rects,
int count);
/**
* \brief Fill a rectangle on the current rendering target with the drawing color.
*
* \param renderer The renderer which should fill a rectangle.
* \param rect A pointer to the destination rectangle, or NULL for the entire
* rendering target.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,
const SDL_FRect * rect);
/**
* \brief Fill some number of rectangles on the current rendering target with the drawing color.
*
* \param renderer The renderer which should fill multiple rectangles.
* \param rects A pointer to an array of destination rectangles.
* \param count The number of rectangles.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,
const SDL_FRect * rects,
int count);
/**
* \brief Copy a portion of the texture to the current rendering target.
*
* \param renderer The renderer which should copy parts of a texture.
* \param texture The source texture.
* \param srcrect A pointer to the source rectangle, or NULL for the entire
* texture.
* \param dstrect A pointer to the destination rectangle, or NULL for the
* entire rendering target.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,
SDL_Texture * texture,
const SDL_Rect * srcrect,
const SDL_FRect * dstrect);
/**
* \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
*
* \param renderer The renderer which should copy parts of a texture.
* \param texture The source texture.
* \param srcrect A pointer to the source rectangle, or NULL for the entire
* texture.
* \param dstrect A pointer to the destination rectangle, or NULL for the
* entire rendering target.
* \param angle An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction
* \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).
* \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,
SDL_Texture * texture,
const SDL_Rect * srcrect,
const SDL_FRect * dstrect,
const double angle,
const SDL_FPoint *center,
const SDL_RendererFlip flip);
/**
* \brief Read pixels from the current rendering target.
*
@ -876,6 +1018,31 @@ extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
*/
extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
/**
* \brief Force the rendering context to flush any pending commands to the
* underlying rendering API.
*
* You do not need to (and in fact, shouldn't) call this function unless
* you are planning to call into OpenGL/Direct3D/Metal/whatever directly
* in addition to using an SDL_Renderer.
*
* This is for a very-specific case: if you are using SDL's render API,
* you asked for a specific renderer backend (OpenGL, Direct3D, etc),
* you set SDL_HINT_RENDER_BATCHING to "1", and you plan to make
* OpenGL/D3D/whatever calls in addition to SDL render API calls. If all of
* this applies, you should call SDL_RenderFlush() between calls to SDL's
* render API and the low-level API you're using in cooperation.
*
* In all other cases, you can ignore this function. This is only here to
* get maximum performance out of a specific situation. In all other cases,
* SDL will do the right thing, perhaps at a performance loss.
*
* This function is first available in SDL 2.0.10, and is not needed in
* 2.0.9 and earlier, as earlier versions did not queue rendering commands
* at all, instead flushing them to the OS immediately.
*/
extern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);
/**
* \brief Bind the texture to the current OpenGL/ES/ES2 context for use with

View file

@ -1,2 +1,2 @@
#define SDL_REVISION "hg-12373:8feb5da6f2fb"
#define SDL_REVISION_NUMBER 12373
#define SDL_REVISION "hg-12428:f5d2abe5af7f"
#define SDL_REVISION_NUMBER 12428

View file

@ -130,7 +130,7 @@ typedef enum
SDL_SYSWM_COCOA,
SDL_SYSWM_UIKIT,
SDL_SYSWM_WAYLAND,
SDL_SYSWM_MIR,
SDL_SYSWM_MIR, /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
SDL_SYSWM_WINRT,
SDL_SYSWM_ANDROID,
SDL_SYSWM_VIVANTE,
@ -275,11 +275,11 @@ struct SDL_SysWMinfo
struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
} wl;
#endif
#if defined(SDL_VIDEO_DRIVER_MIR)
#if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
struct
{
struct MirConnection *connection; /**< Mir display server connection */
struct MirSurface *surface; /**< Mir surface */
void *connection; /**< Mir display server connection */
void *surface; /**< Mir surface */
} mir;
#endif

View file

@ -41,6 +41,14 @@ extern "C" {
typedef Sint64 SDL_TouchID;
typedef Sint64 SDL_FingerID;
typedef enum
{
SDL_TOUCH_DEVICE_INVALID = -1,
SDL_TOUCH_DEVICE_DIRECT, /* touch screen with window-relative coordinates */
SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */
SDL_TOUCH_DEVICE_INDIRECT_RELATIVE, /* trackpad with screen cursor-relative coordinates */
} SDL_TouchDeviceType;
typedef struct SDL_Finger
{
SDL_FingerID id;
@ -65,6 +73,11 @@ extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
*/
extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
/**
* \brief Get the type of the given touch device.
*/
extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
/**
* \brief Get the number of active fingers for a given touch device.
*/

View file

@ -101,6 +101,15 @@ SDL_MostSignificantBitIndex32(Uint32 x)
#endif
}
SDL_FORCE_INLINE SDL_bool
SDL_HasExactlyOneBitSet32(Uint32 x)
{
if (x && !(x & (x - 1))) {
return SDL_TRUE;
}
return SDL_FALSE;
}
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}

View file

@ -50,12 +50,9 @@
#elif defined(__MINGW64_VERSION_MAJOR)
#include <intrin.h>
#else
#ifdef __ALTIVEC__
#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
#include <altivec.h>
#undef pixel
#undef bool
#endif
#endif
#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
#include <arm_neon.h>

View file

@ -1043,6 +1043,31 @@ extern "C" {
*/
#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
/**
* \brief A variable controlling whether the 2D render API is compatible or efficient.
*
* This variable can be set to the following values:
*
* "0" - Don't use batching to make rendering more efficient.
* "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
*
* Up to SDL 2.0.9, the render API would draw immediately when requested. Now
* it batches up draw requests and sends them all to the GPU only when forced
* to (during SDL_RenderPresent, when changing render targets, by updating a
* texture that the batch needs, etc). This is significantly more efficient,
* but it can cause problems for apps that expect to render on top of the
* render API's output. As such, SDL will disable batching if a specific
* render backend is requested (since this might indicate that the app is
* planning to use the underlying graphics API directly). This hint can
* be used to explicitly request batching in this instance. It is a contract
* that you will either never use the underlying graphics API directly, or
* if you do, you will call SDL_RenderFlush() before you do so any current
* batch goes to the GPU before your work begins. Not following this contract
* will result in undefined behavior.
*/
#define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
/**
* \brief An enumeration of hint priorities
*/

View file

@ -168,7 +168,7 @@ enum
((format) && (SDL_PIXELFLAG(format) != 1))
/* Note: If you modify this list, update SDL_GetPixelFormatName() */
enum
typedef enum
{
SDL_PIXELFORMAT_UNKNOWN,
SDL_PIXELFORMAT_INDEX1LSB =
@ -290,7 +290,7 @@ enum
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
};
} SDL_PixelFormatEnum;
typedef struct SDL_Color
{

View file

@ -40,7 +40,7 @@ extern "C" {
#endif
/**
* \brief The structure that defines a point
* \brief The structure that defines a point (integer)
*
* \sa SDL_EnclosePoints
* \sa SDL_PointInRect
@ -52,7 +52,20 @@ typedef struct SDL_Point
} SDL_Point;
/**
* \brief A rectangle, with the origin at the upper left.
* \brief The structure that defines a point (floating point)
*
* \sa SDL_EnclosePoints
* \sa SDL_PointInRect
*/
typedef struct SDL_FPoint
{
float x;
float y;
} SDL_FPoint;
/**
* \brief A rectangle, with the origin at the upper left (integer).
*
* \sa SDL_RectEmpty
* \sa SDL_RectEquals
@ -67,6 +80,19 @@ typedef struct SDL_Rect
int w, h;
} SDL_Rect;
/**
* \brief A rectangle, with the origin at the upper left (floating point).
*/
typedef struct SDL_FRect
{
float x;
float y;
float w;
float h;
} SDL_FRect;
/**
* \brief Returns true if point resides inside a rectangle.
*/

View file

@ -835,6 +835,148 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
const SDL_Point *center,
const SDL_RendererFlip flip);
/**
* \brief Draw a point on the current rendering target.
*
* \param renderer The renderer which should draw a point.
* \param x The x coordinate of the point.
* \param y The y coordinate of the point.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,
float x, float y);
/**
* \brief Draw multiple points on the current rendering target.
*
* \param renderer The renderer which should draw multiple points.
* \param points The points to draw
* \param count The number of points to draw
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,
const SDL_FPoint * points,
int count);
/**
* \brief Draw a line on the current rendering target.
*
* \param renderer The renderer which should draw a line.
* \param x1 The x coordinate of the start point.
* \param y1 The y coordinate of the start point.
* \param x2 The x coordinate of the end point.
* \param y2 The y coordinate of the end point.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,
float x1, float y1, float x2, float y2);
/**
* \brief Draw a series of connected lines on the current rendering target.
*
* \param renderer The renderer which should draw multiple lines.
* \param points The points along the lines
* \param count The number of points, drawing count-1 lines
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,
const SDL_FPoint * points,
int count);
/**
* \brief Draw a rectangle on the current rendering target.
*
* \param renderer The renderer which should draw a rectangle.
* \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,
const SDL_FRect * rect);
/**
* \brief Draw some number of rectangles on the current rendering target.
*
* \param renderer The renderer which should draw multiple rectangles.
* \param rects A pointer to an array of destination rectangles.
* \param count The number of rectangles.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,
const SDL_FRect * rects,
int count);
/**
* \brief Fill a rectangle on the current rendering target with the drawing color.
*
* \param renderer The renderer which should fill a rectangle.
* \param rect A pointer to the destination rectangle, or NULL for the entire
* rendering target.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,
const SDL_FRect * rect);
/**
* \brief Fill some number of rectangles on the current rendering target with the drawing color.
*
* \param renderer The renderer which should fill multiple rectangles.
* \param rects A pointer to an array of destination rectangles.
* \param count The number of rectangles.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,
const SDL_FRect * rects,
int count);
/**
* \brief Copy a portion of the texture to the current rendering target.
*
* \param renderer The renderer which should copy parts of a texture.
* \param texture The source texture.
* \param srcrect A pointer to the source rectangle, or NULL for the entire
* texture.
* \param dstrect A pointer to the destination rectangle, or NULL for the
* entire rendering target.
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,
SDL_Texture * texture,
const SDL_Rect * srcrect,
const SDL_FRect * dstrect);
/**
* \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
*
* \param renderer The renderer which should copy parts of a texture.
* \param texture The source texture.
* \param srcrect A pointer to the source rectangle, or NULL for the entire
* texture.
* \param dstrect A pointer to the destination rectangle, or NULL for the
* entire rendering target.
* \param angle An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction
* \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).
* \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture
*
* \return 0 on success, or -1 on error
*/
extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,
SDL_Texture * texture,
const SDL_Rect * srcrect,
const SDL_FRect * dstrect,
const double angle,
const SDL_FPoint *center,
const SDL_RendererFlip flip);
/**
* \brief Read pixels from the current rendering target.
*
@ -876,6 +1018,31 @@ extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
*/
extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
/**
* \brief Force the rendering context to flush any pending commands to the
* underlying rendering API.
*
* You do not need to (and in fact, shouldn't) call this function unless
* you are planning to call into OpenGL/Direct3D/Metal/whatever directly
* in addition to using an SDL_Renderer.
*
* This is for a very-specific case: if you are using SDL's render API,
* you asked for a specific renderer backend (OpenGL, Direct3D, etc),
* you set SDL_HINT_RENDER_BATCHING to "1", and you plan to make
* OpenGL/D3D/whatever calls in addition to SDL render API calls. If all of
* this applies, you should call SDL_RenderFlush() between calls to SDL's
* render API and the low-level API you're using in cooperation.
*
* In all other cases, you can ignore this function. This is only here to
* get maximum performance out of a specific situation. In all other cases,
* SDL will do the right thing, perhaps at a performance loss.
*
* This function is first available in SDL 2.0.10, and is not needed in
* 2.0.9 and earlier, as earlier versions did not queue rendering commands
* at all, instead flushing them to the OS immediately.
*/
extern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);
/**
* \brief Bind the texture to the current OpenGL/ES/ES2 context for use with

View file

@ -1,2 +1,2 @@
#define SDL_REVISION "hg-12373:8feb5da6f2fb"
#define SDL_REVISION_NUMBER 12373
#define SDL_REVISION "hg-12425:266c5fbe0bbd"
#define SDL_REVISION_NUMBER 12425

View file

@ -130,7 +130,7 @@ typedef enum
SDL_SYSWM_COCOA,
SDL_SYSWM_UIKIT,
SDL_SYSWM_WAYLAND,
SDL_SYSWM_MIR,
SDL_SYSWM_MIR, /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
SDL_SYSWM_WINRT,
SDL_SYSWM_ANDROID,
SDL_SYSWM_VIVANTE,
@ -275,11 +275,11 @@ struct SDL_SysWMinfo
struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
} wl;
#endif
#if defined(SDL_VIDEO_DRIVER_MIR)
#if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
struct
{
struct MirConnection *connection; /**< Mir display server connection */
struct MirSurface *surface; /**< Mir surface */
void *connection; /**< Mir display server connection */
void *surface; /**< Mir surface */
} mir;
#endif

View file

@ -41,6 +41,14 @@ extern "C" {
typedef Sint64 SDL_TouchID;
typedef Sint64 SDL_FingerID;
typedef enum
{
SDL_TOUCH_DEVICE_INVALID = -1,
SDL_TOUCH_DEVICE_DIRECT, /* touch screen with window-relative coordinates */
SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */
SDL_TOUCH_DEVICE_INDIRECT_RELATIVE, /* trackpad with screen cursor-relative coordinates */
} SDL_TouchDeviceType;
typedef struct SDL_Finger
{
SDL_FingerID id;
@ -65,6 +73,11 @@ extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
*/
extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
/**
* \brief Get the type of the given touch device.
*/
extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
/**
* \brief Get the number of active fingers for a given touch device.
*/

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,4 +1,4 @@
; lib /def:SDL2.def /out:SDL2.lib /machine:x86
;; lib /def:SDL2.def /out:SDL2.lib /machine:x86
LIBRARY SDL2.dll
EXPORTS
SDL_AddEventWatch
@ -225,6 +225,7 @@ SDL_GetThreadID
SDL_GetThreadName
SDL_GetTicks
SDL_GetTouchDevice
SDL_GetTouchDeviceType
SDL_GetTouchFinger
SDL_GetVersion
SDL_GetVideoDriver
@ -417,14 +418,25 @@ SDL_RemoveTimer
SDL_RenderClear
SDL_RenderCopy
SDL_RenderCopyEx
SDL_RenderCopyExF
SDL_RenderCopyF
SDL_RenderDrawLine
SDL_RenderDrawLineF
SDL_RenderDrawLines
SDL_RenderDrawLinesF
SDL_RenderDrawPoint
SDL_RenderDrawPointF
SDL_RenderDrawPoints
SDL_RenderDrawPointsF
SDL_RenderDrawRect
SDL_RenderDrawRectF
SDL_RenderDrawRects
SDL_RenderDrawRectsF
SDL_RenderFillRect
SDL_RenderFillRectF
SDL_RenderFillRects
SDL_RenderFillRectsF
SDL_RenderFlush
SDL_RenderGetClipRect
SDL_RenderGetD3D9Device
SDL_RenderGetIntegerScale

View file

@ -222,6 +222,7 @@
++'_SDL_GetThreadName'.'SDL2.DLL'..'SDL_GetThreadName'
++'_SDL_GetTicks'.'SDL2.DLL'..'SDL_GetTicks'
++'_SDL_GetTouchDevice'.'SDL2.DLL'..'SDL_GetTouchDevice'
++'_SDL_GetTouchDeviceType'.'SDL2.DLL'..'SDL_GetTouchDeviceType'
++'_SDL_GetTouchFinger'.'SDL2.DLL'..'SDL_GetTouchFinger'
++'_SDL_GetVersion'.'SDL2.DLL'..'SDL_GetVersion'
++'_SDL_GetVideoDriver'.'SDL2.DLL'..'SDL_GetVideoDriver'
@ -414,14 +415,25 @@
++'_SDL_RenderClear'.'SDL2.DLL'..'SDL_RenderClear'
++'_SDL_RenderCopy'.'SDL2.DLL'..'SDL_RenderCopy'
++'_SDL_RenderCopyEx'.'SDL2.DLL'..'SDL_RenderCopyEx'
++'_SDL_RenderCopyExF'.'SDL2.DLL'..'SDL_RenderCopyExF'
++'_SDL_RenderCopyF'.'SDL2.DLL'..'SDL_RenderCopyF'
++'_SDL_RenderDrawLine'.'SDL2.DLL'..'SDL_RenderDrawLine'
++'_SDL_RenderDrawLineF'.'SDL2.DLL'..'SDL_RenderDrawLineF'
++'_SDL_RenderDrawLines'.'SDL2.DLL'..'SDL_RenderDrawLines'
++'_SDL_RenderDrawLinesF'.'SDL2.DLL'..'SDL_RenderDrawLinesF'
++'_SDL_RenderDrawPoint'.'SDL2.DLL'..'SDL_RenderDrawPoint'
++'_SDL_RenderDrawPointF'.'SDL2.DLL'..'SDL_RenderDrawPointF'
++'_SDL_RenderDrawPoints'.'SDL2.DLL'..'SDL_RenderDrawPoints'
++'_SDL_RenderDrawPointsF'.'SDL2.DLL'..'SDL_RenderDrawPointsF'
++'_SDL_RenderDrawRect'.'SDL2.DLL'..'SDL_RenderDrawRect'
++'_SDL_RenderDrawRectF'.'SDL2.DLL'..'SDL_RenderDrawRectF'
++'_SDL_RenderDrawRects'.'SDL2.DLL'..'SDL_RenderDrawRects'
++'_SDL_RenderDrawRectsF'.'SDL2.DLL'..'SDL_RenderDrawRectsF'
++'_SDL_RenderFillRect'.'SDL2.DLL'..'SDL_RenderFillRect'
++'_SDL_RenderFillRectF'.'SDL2.DLL'..'SDL_RenderFillRectF'
++'_SDL_RenderFillRects'.'SDL2.DLL'..'SDL_RenderFillRects'
++'_SDL_RenderFillRectsF'.'SDL2.DLL'..'SDL_RenderFillRectsF'
++'_SDL_RenderFlush'.'SDL2.DLL'..'SDL_RenderFlush'
++'_SDL_RenderGetClipRect'.'SDL2.DLL'..'SDL_RenderGetClipRect'
++'_SDL_RenderGetD3D9Device'.'SDL2.DLL'..'SDL_RenderGetD3D9Device'
++'_SDL_RenderGetIntegerScale'.'SDL2.DLL'..'SDL_RenderGetIntegerScale'

Binary file not shown.