Sfoglia il codice sorgente

Fix outdated references to SDL symbols in docs. Fixes #11503

Maia 4 mesi fa
parent
commit
97ddc9adf2

+ 0 - 1
include/SDL3/SDL_atomic.h

@@ -475,7 +475,6 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddAtomicInt(SDL_AtomicInt *a, int v);
  * \sa SDL_CompareAndSwapAtomicU32
  * \sa SDL_GetAtomicU32
  * \sa SDL_SetAtomicU32
- * \sa SDL_AddAtomicU32
  */
 typedef struct SDL_AtomicU32 { Uint32 value; } SDL_AtomicU32;
 

+ 0 - 1
include/SDL3/SDL_audio.h

@@ -542,7 +542,6 @@ extern SDL_DECLSPEC SDL_AudioDeviceID * SDLCALL SDL_GetAudioRecordingDevices(int
  *
  * \sa SDL_GetAudioPlaybackDevices
  * \sa SDL_GetAudioRecordingDevices
- * \sa SDL_GetDefaultAudioInfo
  */
 extern SDL_DECLSPEC const char * SDLCALL SDL_GetAudioDeviceName(SDL_AudioDeviceID devid);
 

+ 1 - 2
include/SDL3/SDL_camera.h

@@ -425,7 +425,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetCameraFormat(SDL_Camera *camera, SDL_Cam
  * After use, the frame should be released with SDL_ReleaseCameraFrame(). If
  * you don't do this, the system may stop providing more video!
  *
- * Do not call SDL_FreeSurface() on the returned surface! It must be given
+ * Do not call SDL_DestroySurface() on the returned surface! It must be given
  * back to the camera subsystem with SDL_ReleaseCameraFrame!
  *
  * If the system is waiting for the user to approve access to the camera, as
@@ -487,7 +487,6 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseCameraFrame(SDL_Camera *camera, SDL_
  *
  * \since This function is available since SDL 3.1.3.
  *
- * \sa SDL_OpenCameraWithSpec
  * \sa SDL_OpenCamera
  */
 extern SDL_DECLSPEC void SDLCALL SDL_CloseCamera(SDL_Camera *camera);

+ 4 - 4
include/SDL3/SDL_gpu.h

@@ -1838,11 +1838,11 @@ typedef struct SDL_GPUBlitInfo {
  * \since This struct is available since SDL 3.1.3
  *
  * \sa SDL_BindGPUVertexBuffers
- * \sa SDL_BindGPUIndexBuffers
+ * \sa SDL_BindGPUIndexBuffer
  */
 typedef struct SDL_GPUBufferBinding
 {
-    SDL_GPUBuffer *buffer;  /**< The buffer to bind. Must have been created with SDL_GPU_BUFFERUSAGE_VERTEX for SDL_BindGPUVertexBuffers, or SDL_GPU_BUFFERUSAGE_INDEX for SDL_BindGPUIndexBuffers. */
+    SDL_GPUBuffer *buffer;  /**< The buffer to bind. Must have been created with SDL_GPU_BUFFERUSAGE_VERTEX for SDL_BindGPUVertexBuffers, or SDL_GPU_BUFFERUSAGE_INDEX for SDL_BindGPUIndexBuffer. */
     Uint32 offset;          /**< The starting byte of the data to bind in the buffer. */
 } SDL_GPUBufferBinding;
 
@@ -2149,7 +2149,7 @@ extern SDL_DECLSPEC SDL_GPUGraphicsPipeline *SDLCALL SDL_CreateGPUGraphicsPipeli
  *
  * \sa SDL_BindGPUVertexSamplers
  * \sa SDL_BindGPUFragmentSamplers
- * \sa SDL_ReleaseSampler
+ * \sa SDL_ReleaseGPUSampler
  */
 extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler(
     SDL_GPUDevice *device,
@@ -2201,7 +2201,7 @@ extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler(
  *   is bound at [[buffer(14)]], vertex buffer 1 at [[buffer(15)]], and so on.
  *   Rather than manually authoring vertex buffer indices, use the
  *   [[stage_in]] attribute which will automatically use the vertex input
- *   information from the SDL_GPUPipeline.
+ *   information from the SDL_GPUGraphicsPipeline.
  *
  * \param device a GPU Context.
  * \param createinfo a struct describing the state of the shader to create.

+ 1 - 1
include/SDL3/SDL_hints.h

@@ -1034,7 +1034,7 @@ extern "C" {
  * force a specific target, such as "direct3d11" if, say, your hardware
  * supports D3D12 but want to try using D3D11 instead.
  *
- * This hint should be set before SDL_GPUSelectBackend() is called.
+ * This hint should be set before any GPU functions are called.
  *
  * \since This hint is available since SDL 3.1.3.
  */

+ 1 - 1
include/SDL3/SDL_keyboard.h

@@ -367,7 +367,7 @@ typedef enum SDL_TextInputType
  * Auto capitalization type.
  *
  * These are the valid values for
- * SDL_PROP_TEXTINPUT_AUTOCAPITALIZATION_NUMBER. Not every value is valid on
+ * SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER. Not every value is valid on
  * every platform, but where a value isn't supported, a reasonable fallback
  * will be used.
  *

+ 1 - 1
include/SDL3/SDL_messagebox.h

@@ -39,7 +39,7 @@ extern "C" {
 #endif
 
 /**
- * SDL_MessageBox flags.
+ * Message box flags.
  *
  * If supported will display warning icon, etc.
  *

+ 2 - 2
include/SDL3/SDL_process.h

@@ -102,7 +102,7 @@ extern SDL_DECLSPEC SDL_Process *SDLCALL SDL_CreateProcess(const char * const *a
  * Description of where standard I/O should be directed when creating a
  * process.
  *
- * If a standard I/O stream is set to SDL_PROCESS_STDIO_INHERIT, it will go to
+ * If a standard I/O stream is set to SDL_PROCESS_STDIO_INHERITED, it will go to
  * the same place as the application's I/O stream. This is the default for
  * standard output and standard error.
  *
@@ -298,7 +298,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_ReadProcess(SDL_Process *process, size_t
  *
  * Writing to this stream can return less data than expected if the process
  * hasn't read its input. It may be blocked waiting for its output to be read,
- * so if you may need to call SDL_GetOutputStream() and read the output in
+ * if so you may need to call SDL_GetProcessOutput() and read the output in
  * parallel with writing input.
  *
  * \param process The process to get the input stream for.

+ 9 - 20
include/SDL3/SDL_render.h

@@ -253,7 +253,7 @@ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window *window
  *   displayed, required if this isn't a software renderer using a surface
  * - `SDL_PROP_RENDERER_CREATE_SURFACE_POINTER`: the surface where rendering
  *   is displayed, if you want a software renderer without a window
- * - `SDL_PROP_RENDERER_CREATE_OUTPUT_COLORSPACE_NUMBER`: an SDL_ColorSpace
+ * - `SDL_PROP_RENDERER_CREATE_OUTPUT_COLORSPACE_NUMBER`: an SDL_Colorspace
  *   value describing the colorspace for output to the display, defaults to
  *   SDL_COLORSPACE_SRGB. The direct3d11, direct3d12, and metal renderers
  *   support SDL_COLORSPACE_SRGB_LINEAR, which is a linear color space and
@@ -386,21 +386,21 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetRendererName(SDL_Renderer *rende
  * - `SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER`: a (const SDL_PixelFormat *)
  *   array of pixel formats, terminated with SDL_PIXELFORMAT_UNKNOWN,
  *   representing the available texture formats for this renderer.
- * - `SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER`: an SDL_ColorSpace value
+ * - `SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER`: an SDL_Colorspace value
  *   describing the colorspace for output to the display, defaults to
  *   SDL_COLORSPACE_SRGB.
  * - `SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN`: true if the output colorspace is
  *   SDL_COLORSPACE_SRGB_LINEAR and the renderer is showing on a display with
  *   HDR enabled. This property can change dynamically when
- *   SDL_EVENT_DISPLAY_HDR_STATE_CHANGED is sent.
+ *   SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
  * - `SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT`: the value of SDR white in the
  *   SDL_COLORSPACE_SRGB_LINEAR colorspace. When HDR is enabled, this value is
  *   automatically multiplied into the color scale. This property can change
- *   dynamically when SDL_EVENT_DISPLAY_HDR_STATE_CHANGED is sent.
+ *   dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
  * - `SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT`: the additional high dynamic range
  *   that can be displayed, in terms of the SDR white point. When HDR is not
  *   enabled, this will be 1.0. This property can change dynamically when
- *   SDL_EVENT_DISPLAY_HDR_STATE_CHANGED is sent.
+ *   SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
  *
  * With the direct3d renderer:
  *
@@ -576,7 +576,7 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Rende
  *
  * These are the supported properties:
  *
- * - `SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER`: an SDL_ColorSpace value
+ * - `SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER`: an SDL_Colorspace value
  *   describing the texture colorspace, defaults to SDL_COLORSPACE_SRGB_LINEAR
  *   for floating point textures, SDL_COLORSPACE_HDR10 for 10-bit textures,
  *   SDL_COLORSPACE_SRGB for other RGB textures and SDL_COLORSPACE_JPEG for
@@ -713,7 +713,7 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureWithProperties(SDL_Re
  *
  * The following read-only properties are provided by SDL:
  *
- * - `SDL_PROP_TEXTURE_COLORSPACE_NUMBER`: an SDL_ColorSpace value describing
+ * - `SDL_PROP_TEXTURE_COLORSPACE_NUMBER`: an SDL_Colorspace value describing
  *   the texture colorspace.
  * - `SDL_PROP_TEXTURE_FORMAT_NUMBER`: one of the enumerated values in
  *   SDL_PixelFormat.
@@ -753,14 +753,8 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureWithProperties(SDL_Re
  *
  * With the vulkan renderer:
  *
- * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_POINTER`: the VkImage associated with
- *   the texture
- * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_U_POINTER`: the VkImage associated with
- *   the U plane of a YUV texture
- * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_V_POINTER`: the VkImage associated with
- *   the V plane of a YUV texture
- * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_UV_POINTER`: the VkImage associated with
- *   the UV plane of a NV12/NV21 texture
+ * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER`: the VkImage associated with the
+ *   texture
  *
  * With the opengl renderer:
  *
@@ -792,11 +786,6 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureWithProperties(SDL_Re
  * - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER`: the GLenum for the
  *   texture target (`GL_TEXTURE_2D`, `GL_TEXTURE_EXTERNAL_OES`, etc)
  *
- * With the vulkan renderer:
- *
- * - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER`: the VkImage associated with the
- *   texture
- *
  * \param texture the texture to query.
  * \returns a valid property ID on success or 0 on failure; call
  *          SDL_GetError() for more information.

+ 3 - 4
include/SDL3/SDL_surface.h

@@ -192,7 +192,6 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_CreateSurfaceFrom(int width, int h
  *
  * \since This function is available since SDL 3.1.3.
  *
- * \sa SDL_CreateStackSurface
  * \sa SDL_CreateSurface
  * \sa SDL_CreateSurfaceFrom
  */
@@ -237,7 +236,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetSurfaceProperties(SDL_Surfac
  * interpreted in color operations.
  *
  * \param surface the SDL_Surface structure to update.
- * \param colorspace an SDL_ColorSpace value describing the surface
+ * \param colorspace an SDL_Colorspace value describing the surface
  *                   colorspace.
  * \returns true on success or false on failure; call SDL_GetError() for more
  *          information.
@@ -888,14 +887,14 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ConvertPixels(int width, int height, SDL_Pi
  * \param width the width of the block to copy, in pixels.
  * \param height the height of the block to copy, in pixels.
  * \param src_format an SDL_PixelFormat value of the `src` pixels format.
- * \param src_colorspace an SDL_ColorSpace value describing the colorspace of
+ * \param src_colorspace an SDL_Colorspace value describing the colorspace of
  *                       the `src` pixels.
  * \param src_properties an SDL_PropertiesID with additional source color
  *                       properties, or 0.
  * \param src a pointer to the source pixels.
  * \param src_pitch the pitch of the source pixels, in bytes.
  * \param dst_format an SDL_PixelFormat value of the `dst` pixels format.
- * \param dst_colorspace an SDL_ColorSpace value describing the colorspace of
+ * \param dst_colorspace an SDL_Colorspace value describing the colorspace of
  *                       the `dst` pixels.
  * \param dst_properties an SDL_PropertiesID with additional destination color
  *                       properties, or 0.