mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-19 15:11:00 +00:00
Bump SDL to 2.28.5 and add FFmpeg for AV1 parsing
This commit is contained in:
+102
-12
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -187,7 +187,8 @@ typedef enum
|
||||
SDL_DISPLAYEVENT_NONE, /**< Never used */
|
||||
SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */
|
||||
SDL_DISPLAYEVENT_CONNECTED, /**< Display has been added to the system */
|
||||
SDL_DISPLAYEVENT_DISCONNECTED /**< Display has been removed from the system */
|
||||
SDL_DISPLAYEVENT_DISCONNECTED, /**< Display has been removed from the system */
|
||||
SDL_DISPLAYEVENT_MOVED /**< Display has changed position */
|
||||
} SDL_DisplayEventID;
|
||||
|
||||
/**
|
||||
@@ -248,7 +249,8 @@ typedef enum
|
||||
SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
|
||||
SDL_GL_CONTEXT_RELEASE_BEHAVIOR,
|
||||
SDL_GL_CONTEXT_RESET_NOTIFICATION,
|
||||
SDL_GL_CONTEXT_NO_ERROR
|
||||
SDL_GL_CONTEXT_NO_ERROR,
|
||||
SDL_GL_FLOATBUFFERS
|
||||
} SDL_GLattr;
|
||||
|
||||
typedef enum
|
||||
@@ -444,6 +446,15 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rec
|
||||
* A failure of this function usually means that either no DPI information is
|
||||
* available or the `displayIndex` is out of range.
|
||||
*
|
||||
* **WARNING**: This reports the DPI that the hardware reports, and it is not
|
||||
* always reliable! It is almost always better to use SDL_GetWindowSize() to
|
||||
* find the window size, which might be in logical points instead of pixels,
|
||||
* and then SDL_GL_GetDrawableSize(), SDL_Vulkan_GetDrawableSize(),
|
||||
* SDL_Metal_GetDrawableSize(), or SDL_GetRendererOutputSize(), and compare
|
||||
* the two values to get an actual scaling value between the two. We will be
|
||||
* rethinking how high-dpi details should be managed in SDL3 to make things
|
||||
* more consistent, reliable, and clear.
|
||||
*
|
||||
* \param displayIndex the index of the display from which DPI information
|
||||
* should be queried
|
||||
* \param ddpi a pointer filled in with the diagonal DPI of the display; may
|
||||
@@ -587,6 +598,35 @@ extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_Disp
|
||||
*/
|
||||
extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
|
||||
|
||||
/**
|
||||
* Get the index of the display containing a point
|
||||
*
|
||||
* \param point the point to query
|
||||
* \returns the index of the display containing the point or a negative error
|
||||
* code on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GetDisplayBounds
|
||||
* \sa SDL_GetNumVideoDisplays
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetPointDisplayIndex(const SDL_Point * point);
|
||||
|
||||
/**
|
||||
* Get the index of the display primarily containing a rect
|
||||
*
|
||||
* \param rect the rect to query
|
||||
* \returns the index of the display entirely containing the rect or closest
|
||||
* to the center of the rect on success or a negative error code on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GetDisplayBounds
|
||||
* \sa SDL_GetNumVideoDisplays
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetRectDisplayIndex(const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* Get the index of the display associated with a window.
|
||||
*
|
||||
@@ -697,7 +737,10 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
|
||||
* in pixels may differ from its size in screen coordinates on platforms with
|
||||
* high-DPI support (e.g. iOS and macOS). Use SDL_GetWindowSize() to query the
|
||||
* client area's size in screen coordinates, and SDL_GL_GetDrawableSize() or
|
||||
* SDL_GetRendererOutputSize() to query the drawable size in pixels.
|
||||
* SDL_GetRendererOutputSize() to query the drawable size in pixels. Note that
|
||||
* when this flag is set, the drawable size can vary after the window is
|
||||
* created and should be queried after major window events such as when the
|
||||
* window is resized or moved between displays.
|
||||
*
|
||||
* If the window is set fullscreen, the width and height parameters `w` and
|
||||
* `h` will not be used. However, invalid size parameters (e.g. too large) may
|
||||
@@ -1004,6 +1047,27 @@ extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
|
||||
int *top, int *left,
|
||||
int *bottom, int *right);
|
||||
|
||||
/**
|
||||
* Get the size of a window in pixels.
|
||||
*
|
||||
* This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
|
||||
* drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
|
||||
* platform with high-DPI support (Apple calls this "Retina"), and not
|
||||
* disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
|
||||
*
|
||||
* \param window the window from which the drawable size should be queried
|
||||
* \param w a pointer to variable for storing the width in pixels, may be NULL
|
||||
* \param h a pointer to variable for storing the height in pixels, may be
|
||||
* NULL
|
||||
*
|
||||
* \since This function is available since SDL 2.26.0.
|
||||
*
|
||||
* \sa SDL_CreateWindow
|
||||
* \sa SDL_GetWindowSize
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetWindowSizeInPixels(SDL_Window * window,
|
||||
int *w, int *h);
|
||||
|
||||
/**
|
||||
* Set the minimum size of a window's client area.
|
||||
*
|
||||
@@ -1211,6 +1275,17 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
|
||||
extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
|
||||
Uint32 flags);
|
||||
|
||||
/**
|
||||
* Return whether the window has a surface associated with it.
|
||||
*
|
||||
* \returns SDL_TRUE if there is a surface associated with the window, or SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.28.0.
|
||||
*
|
||||
* \sa SDL_GetWindowSurface
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasWindowSurface(SDL_Window *window);
|
||||
|
||||
/**
|
||||
* Get the SDL surface associated with the window.
|
||||
*
|
||||
@@ -1231,6 +1306,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_DestroyWindowSurface
|
||||
* \sa SDL_HasWindowSurface
|
||||
* \sa SDL_UpdateWindowSurface
|
||||
* \sa SDL_UpdateWindowSurfaceRects
|
||||
*/
|
||||
@@ -1265,7 +1342,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
|
||||
*
|
||||
* \param window the window to update
|
||||
* \param rects an array of SDL_Rect structures representing areas of the
|
||||
* surface to copy
|
||||
* surface to copy, in pixels
|
||||
* \param numrects the number of rectangles
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
@@ -1279,6 +1356,20 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
|
||||
const SDL_Rect * rects,
|
||||
int numrects);
|
||||
|
||||
/**
|
||||
* Destroy the surface associated with the window.
|
||||
*
|
||||
* \param window the window to update
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.28.0.
|
||||
*
|
||||
* \sa SDL_GetWindowSurface
|
||||
* \sa SDL_HasWindowSurface
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_DestroyWindowSurface(SDL_Window *window);
|
||||
|
||||
/**
|
||||
* Set a window's input grab mode.
|
||||
*
|
||||
@@ -1337,6 +1428,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window,
|
||||
* Mouse grab confines the mouse cursor to the window.
|
||||
*
|
||||
* \param window The window for which the mouse grab mode should be set.
|
||||
* \param grabbed This is SDL_TRUE to grab mouse, and SDL_FALSE to release.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.16.
|
||||
*
|
||||
@@ -1747,6 +1839,9 @@ extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
|
||||
* If you disable the screensaver, it is automatically re-enabled when SDL
|
||||
* quits.
|
||||
*
|
||||
* The screensaver is disabled by default since SDL 2.0.2. Before SDL 2.0.2
|
||||
* the screensaver was enabled by default.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_EnableScreenSaver
|
||||
@@ -2008,13 +2103,8 @@ extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
|
||||
* retry the call with 1 for the interval.
|
||||
*
|
||||
* Adaptive vsync is implemented for some glX drivers with
|
||||
* GLX_EXT_swap_control_tear:
|
||||
*
|
||||
* https://www.opengl.org/registry/specs/EXT/glx_swap_control_tear.txt
|
||||
*
|
||||
* and for some Windows drivers with WGL_EXT_swap_control_tear:
|
||||
*
|
||||
* https://www.opengl.org/registry/specs/EXT/wgl_swap_control_tear.txt
|
||||
* GLX_EXT_swap_control_tear, and for some Windows drivers with
|
||||
* WGL_EXT_swap_control_tear.
|
||||
*
|
||||
* Read more on the Khronos wiki:
|
||||
* https://www.khronos.org/opengl/wiki/Swap_Interval#Adaptive_Vsync
|
||||
|
||||
Reference in New Issue
Block a user