Skip to content

Commit 1848f52

Browse files
authored
Merge branch 'libsdl-org:main' into x11tk
2 parents f8ac722 + 1fbed16 commit 1848f52

27 files changed

+479
-197
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,6 +2172,7 @@ elseif(WINDOWS)
21722172
#include <gameinput.h>
21732173
int main(int argc, char **argv) { return 0; }" HAVE_GAMEINPUT_H
21742174
)
2175+
check_include_file(dxgi1_5.h HAVE_DXGI1_5_H)
21752176
check_include_file(dxgi1_6.h HAVE_DXGI1_6_H)
21762177
check_include_file(tpcshrd.h HAVE_TPCSHRD_H)
21772178
check_include_file(roapi.h HAVE_ROAPI_H)

include/SDL3/SDL_camera.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,20 @@ typedef enum SDL_CameraPosition
136136
SDL_CAMERA_POSITION_BACK_FACING
137137
} SDL_CameraPosition;
138138

139+
/**
140+
* The current state of a request for camera access.
141+
*
142+
* \since This enum is available since SDL 3.4.0.
143+
*
144+
* \sa SDL_GetCameraPermissionState
145+
*/
146+
typedef enum SDL_CameraPermissionState
147+
{
148+
SDL_CAMERA_PERMISSION_STATE_DENIED = -1,
149+
SDL_CAMERA_PERMISSION_STATE_PENDING,
150+
SDL_CAMERA_PERMISSION_STATE_APPROVED,
151+
} SDL_CameraPermissionState;
152+
139153

140154
/**
141155
* Use this function to get the number of built-in camera drivers.
@@ -368,7 +382,7 @@ extern SDL_DECLSPEC SDL_Camera * SDLCALL SDL_OpenCamera(SDL_CameraID instance_id
368382
* \sa SDL_OpenCamera
369383
* \sa SDL_CloseCamera
370384
*/
371-
extern SDL_DECLSPEC int SDLCALL SDL_GetCameraPermissionState(SDL_Camera *camera);
385+
extern SDL_DECLSPEC SDL_CameraPermissionState SDLCALL SDL_GetCameraPermissionState(SDL_Camera *camera);
372386

373387
/**
374388
* Get the instance ID of an opened camera.

include/SDL3/SDL_gpu.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@
235235
* SDL driver name: "direct3d12"
236236
*
237237
* Supported on Windows 10 or newer, Xbox One (GDK), and Xbox Series X|S
238-
* (GDK). Requires a GPU that supports DirectX 12 Feature Level 11_1.
238+
* (GDK). Requires a GPU that supports DirectX 12 Feature Level 11_0 and
239+
* Resource Binding Tier 2 or above.
239240
*
240241
* ### Metal
241242
*
@@ -3755,6 +3756,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnmapGPUTransferBuffer(
37553756
* \returns a copy pass handle.
37563757
*
37573758
* \since This function is available since SDL 3.2.0.
3759+
*
3760+
* \sa SDL_EndGPUCopyPass
37583761
*/
37593762
extern SDL_DECLSPEC SDL_GPUCopyPass * SDLCALL SDL_BeginGPUCopyPass(
37603763
SDL_GPUCommandBuffer *command_buffer);

include/SDL3/SDL_power.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ typedef enum SDL_PowerState
8888
* can't determine a value or there is no battery.
8989
* \param percent a pointer filled in with the percentage of battery life
9090
* left, between 0 and 100, or NULL to ignore. This will be
91-
* filled in with -1 we can't determine a value or there is no
92-
* battery.
91+
* filled in with -1 when we can't determine a value or there
92+
* is no battery.
9393
* \returns the current battery state or `SDL_POWERSTATE_ERROR` on failure;
9494
* call SDL_GetError() for more information.
9595
*

include/SDL3/SDL_render.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ extern SDL_DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window *window
283283
* present synchronized with the refresh rate. This property can take any
284284
* value that is supported by SDL_SetRenderVSync() for the renderer.
285285
*
286-
* With the SDL GPU renderer:
286+
* With the SDL GPU renderer (since SDL 3.4.0):
287287
*
288288
* - `SDL_PROP_RENDERER_CREATE_GPU_SHADERS_SPIRV_BOOLEAN`: the app is able to
289289
* provide SPIR-V shaders to SDL_GPURenderState, optional.

include/SDL3/SDL_stdinc.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4722,7 +4722,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_atan2f(float y, float x);
47224722
/**
47234723
* Compute the ceiling of `x`.
47244724
*
4725-
* The ceiling of `x` is the smallest integer `y` such that `y > x`, i.e `x`
4725+
* The ceiling of `x` is the smallest integer `y` such that `y >= x`, i.e `x`
47264726
* rounded up to the nearest integer.
47274727
*
47284728
* Domain: `-INF <= x <= INF`
@@ -4750,7 +4750,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_ceil(double x);
47504750
/**
47514751
* Compute the ceiling of `x`.
47524752
*
4753-
* The ceiling of `x` is the smallest integer `y` such that `y > x`, i.e `x`
4753+
* The ceiling of `x` is the smallest integer `y` such that `y >= x`, i.e `x`
47544754
* rounded up to the nearest integer.
47554755
*
47564756
* Domain: `-INF <= x <= INF`
@@ -4992,7 +4992,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_fabsf(float x);
49924992
/**
49934993
* Compute the floor of `x`.
49944994
*
4995-
* The floor of `x` is the largest integer `y` such that `y > x`, i.e `x`
4995+
* The floor of `x` is the largest integer `y` such that `y <= x`, i.e `x`
49964996
* rounded down to the nearest integer.
49974997
*
49984998
* Domain: `-INF <= x <= INF`
@@ -5020,7 +5020,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_floor(double x);
50205020
/**
50215021
* Compute the floor of `x`.
50225022
*
5023-
* The floor of `x` is the largest integer `y` such that `y > x`, i.e `x`
5023+
* The floor of `x` is the largest integer `y` such that `y <= x`, i.e `x`
50245024
* rounded down to the nearest integer.
50255025
*
50265026
* Domain: `-INF <= x <= INF`

include/build_config/SDL_build_config.h.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@
223223
#cmakedefine HAVE_WINDOWS_GAMING_INPUT_H 1
224224
#cmakedefine HAVE_GAMEINPUT_H 1
225225
#cmakedefine HAVE_DXGI_H 1
226+
#cmakedefine HAVE_DXGI1_5_H 1
226227
#cmakedefine HAVE_DXGI1_6_H 1
227228

228229
#cmakedefine HAVE_MMDEVICEAPI_H 1

include/build_config/SDL_build_config_windows.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ typedef unsigned int uintptr_t;
8585
#define HAVE_DXGI_H 1
8686
#define HAVE_XINPUT_H 1
8787
#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00 /* Windows 10 SDK */
88+
#define HAVE_DXGI1_5_H 1
8889
#define HAVE_DXGI1_6_H 1
8990
#define HAVE_WINDOWS_GAMING_INPUT_H 1
9091
#endif

include/build_config/SDL_build_config_wingdk.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#define HAVE_DSOUND_H 1
3838
/* No SDK version checks needed for these because the SDK has to be new. */
3939
#define HAVE_DXGI_H 1
40+
#define HAVE_DXGI1_5_H 1
4041
#define HAVE_DXGI1_6_H 1
4142
#define HAVE_XINPUT_H 1
4243
#define HAVE_WINDOWS_GAMING_INPUT_H 1

0 commit comments

Comments
 (0)