Sam Lantinga
f00ecf5f19
Fixed building with older Windows SDK
2023-12-05 11:00:18 -08:00
Sam Lantinga
7ca43995a1
Fixed warning C4028: formal parameter 1 different from declaration
2023-12-05 10:55:29 -08:00
Sam Lantinga
aab7432f5f
Fixed analyze warnings for SDL_dynapi_procs.h
2023-12-05 09:31:13 -08:00
Sam Lantinga
c484140f56
Fixed warning C33010: Unchecked lower bound for enum scancode used as index.
2023-12-05 09:31:13 -08:00
Sam Lantinga
02a116217d
Fixed Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2).
2023-12-05 09:31:13 -08:00
Sam Lantinga
91da942b33
Fixed warning C28251: Inconsistent annotation for 'SDL_RWvprintf_REAL': this instance has no annotations.
2023-12-05 09:31:13 -08:00
Sam Lantinga
b8840801cc
Fixed analyze warnings in SDL_xinputhaptic.c
...
warning C6340: Mismatch on sign: 'int' passed as _Param_(4) when some unsigned type is required in call to 'SDL_snprintf_REAL'.
warning C6340: Mismatch on sign: 'const unsigned char' passed as _Param_(4) when some signed type is required in call to 'SDL_snprintf_REAL'.
warning C26451: Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2).
2023-12-05 09:31:13 -08:00
Sam Lantinga
8e0d728c67
Fixed warning C26451: Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2).
2023-12-05 09:31:13 -08:00
Sam Lantinga
6a736d7766
Fixed warning C6340: Mismatch on sign: 'unsigned char' passed as _Param_(2) when some signed type is required in call to 'SDL_SetError_REAL'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
1fcc75ba81
Fixed warning C6340: Mismatch on sign: 'unsigned char' passed as _Param_(4) when some signed type is required in call to 'SDL_snprintf_REAL'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
7f2e16db8b
Fixed warning C6340: Mismatch on sign: 'const unsigned short' passed as _Param_(2) when some signed type is required in call to 'SDL_SetError_REAL'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
163de8e697
Fixed warning C6001: Using uninitialized memory 'rdi'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
e29393e407
Fixed warning C6001: Using uninitialized memory 'devName'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
0f34ca2e71
Fixed analyze warnings in SDL_xinputjoystick.c
...
warning C6340: Mismatch on sign: 'int' passed as _Param_(4) when some unsigned type is required in call to 'SDL_snprintf_REAL'.
warning C6001: Using uninitialized memory 'devName'.
warning C6340: Mismatch on sign: 'unsigned char' passed as _Param_(4) when some signed type is required in call to 'SDL_snprintf_REAL'.
warning C6221: Implicit cast between semantically different integer types: comparing HRESULT to an integer. Consider using SUCCEEDED or FAILED macros instead.
2023-12-05 09:31:13 -08:00
Sam Lantinga
2b5c7db645
Fixed analyze warnings in SDL_render_d3d12.c
...
warning C6011: Dereferencing NULL pointer 'data->swapChain'.
warning C6011: Dereferencing NULL pointer 'data->debugInterface'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
a28769759b
Fixed warning C26052: Potentially unconstrained access using expression '(signed char *)info'
2023-12-05 09:31:13 -08:00
Sam Lantinga
6ee34380f4
Fixed warning C6011: Dereferencing NULL pointer 'viewport'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
230581f4a8
Fixed warning C26451: Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2).
2023-12-05 09:31:13 -08:00
Sam Lantinga
3775d9be4b
Fixed warning C28251: Inconsistent annotation for 'SDL_LogMessageV_REAL': this instance has no annotations.
2023-12-05 09:31:13 -08:00
Sam Lantinga
b512182222
Fixed warning C6340: Mismatch on sign: 'unsigned int' passed as _Param_(2) when some signed type is required in call to 'SDL_SetError_REAL'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
8a82f7e837
Fixed warning C33005: VARIANT '&valueX' was provided as an _In_ or _InOut_ parameter but was not initialized
2023-12-05 09:31:13 -08:00
Sam Lantinga
fda039e6f8
Fixed analyzer warnings for SDL_string.c
...
warning C28251: Inconsistent annotation for 'SDL_vsscanf_REAL': this instance has no annotations. See c:\projects\sdl-experimental\include\sdl3\sdl_stdinc.h(597).
warning C28252: Inconsistent annotation for 'SDL_vsnprintf_REAL': _Param_(3) has 'SAL_IsFormatString("printf")' on the prior instance. See c:\projects\sdl-experimental\include\sdl3\sdl_stdinc.h(600).
warning C28253: Inconsistent annotation for 'SDL_vswprintf_REAL': _Param_(3) has 'SAL_IsFormatString("printf")' on this instance. See c:\projects\sdl-experimental\include\sdl3\sdl_stdinc.h(601).
warning C28251: Inconsistent annotation for 'SDL_vasprintf_REAL': this instance has no annotations. See c:\projects\sdl-experimental\include\sdl3\sdl_stdinc.h(603).
2023-12-05 09:31:13 -08:00
Sam Lantinga
22f44aefe7
Fixed warning C6340: Mismatch on sign: 'int' passed as _Param_(3) when some unsigned type is required in call to 'SDL_sscanf_REAL'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
eab2d97d07
Fixed warning C26451: Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2).
2023-12-05 09:31:13 -08:00
Sam Lantinga
41bfcad5d7
Fixed warning C6340: Mismatch on sign: 'unsigned short' passed as _Param_(2) when some signed type is required in call to 'SDL_SetError_REAL'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
54dc73aa88
Fixed warning C6386: Buffer overrun while writing to 'palette_saved_alpha': the writable size is 'sizeof(Uint8)*((palette_saved_alpha_ncolors))' bytes, but '2' bytes might be written.
2023-12-05 09:31:13 -08:00
Sam Lantinga
0dad56354c
Fixed warning C6326: Potential comparison of a constant with another constant.
2023-12-05 09:31:13 -08:00
Sam Lantinga
c9b243fb56
Fixed warning C6263: Using _alloca in a loop: this can quickly overflow stack.
2023-12-05 09:31:13 -08:00
Sam Lantinga
4ccc53edfe
Fixed warning C6011: Dereferencing NULL pointer 'display'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
3db4695ac7
warning C6340: Mismatch on sign: 'unsigned int' passed as _Param_(3) when some signed type is required in call to 'SDL_LogDebug_REAL'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
c7d81d936a
Fixed warning C6031: Return value ignored: 'GetKeyboardState'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
69b9d44bdc
Fixed warning C26451: Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2).
2023-12-05 09:31:13 -08:00
Sam Lantinga
a9b87ee201
Fixed warning C28159: Consider using 'GetTickCount64' instead of 'GetTickCount'. Reason: GetTickCount overflows roughly every 49 days. Code that does not take that into account can loop indefinitely. GetTickCount64 operates on 64 bit values and does not have that problem
2023-12-05 09:31:13 -08:00
Sam Lantinga
21f273ecc7
Fixed warning C6255: _alloca indicates failure by raising a stack overflow exception. Consider using _malloca instead.
2023-12-05 09:31:13 -08:00
Sam Lantinga
0c4cb3d153
Fixed warning C26451: Arithmetic overflow: Using operator '<<' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '<<' to avoid overflow (io.2).
2023-12-05 09:31:13 -08:00
Sam Lantinga
06f8f9a891
Fixed warning C6326: Potential comparison of a constant with another constant.
...
Also fixed warning C6239: (<non-zero constant> && <expression>) always evaluates to the result of <expression>. Did you intend to use the bitwise-and operator?
2023-12-05 09:31:13 -08:00
Sam Lantinga
3e54061fa8
Fixed warning C6011: Dereferencing NULL pointer 'SDL_disabled_events[hi]'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
226f8fde09
Fixed warning C28182: Dereferencing NULL pointer. 'streams[j]' contains the same NULL value as 'stream' did.
2023-12-05 09:31:13 -08:00
Sam Lantinga
fe6b3ab0b0
Fixed warning C6031: Return value ignored: 'CLSIDFromString'.
2023-12-05 09:31:13 -08:00
Sam Lantinga
f3b0149756
Fixed warning C26451: Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2).
2023-12-05 09:31:13 -08:00
Sam Lantinga
6cfce101fb
Don't call the property cleanup function if setting the property fails
...
Fixes https://github.com/libsdl-org/SDL/issues/8659
2023-12-04 07:48:13 -08:00
Sam Lantinga
14380ec48a
Fixed signed/unsigned comparison warning
2023-12-03 15:07:08 -08:00
Sam Lantinga
ac0751a652
Added SDL_strnstr()
2023-12-03 15:06:46 -08:00
Sylvain
7c71e72193
SDL_render: Call InvalidateCachedState to initialise some of driverdata values (eg '*_dirty' to 1).
...
At the earliest place, immediatly after driverdata is set.
(Doing it in SDL_render.c, after creation, would be too late, because there're renderers that already use/change those values in the CreateRender() function).
2023-12-02 21:42:17 +01:00
Sam Lantinga
058213366b
Make sure we use alpha of 0 when clearing a transparent window with no content
2023-12-01 10:51:54 -08:00
Sam Lantinga
ecd56bb8f0
Removed SDL_GetErrorMsg(), trivially implemented in application code
2023-12-01 09:08:23 -08:00
Sam Lantinga
66e532fa61
Handle out of memory errors without any allocation
2023-12-01 09:05:04 -08:00
foobit
579681a372
fixed SDL_SCANCODE_LEFT array position in scancodes_windows.h
2023-12-01 08:24:13 -08:00
SDL Wiki Bot
675423f096
Sync SDL3 wiki -> header
2023-12-01 06:39:09 +00:00
Dimitriy Ryazantcev
744a29b88f
WGI: Cleanup code a bit ( #8647 )
2023-11-30 11:53:00 -08:00