Commit Graph

17274 Commits

Author SHA1 Message Date
Petar Popovic 457d0edeaf Remove some extra semicolons 2024-09-26 20:01:56 +03:00
Anonymous Maarten 345cae361d Document mode parameter of SDL_GetRenderLogicalPresentation 2024-09-26 16:12:13 +02:00
Sam Lantinga 345d9bfe19 A zero source rect is valid for blitting
A zero sized source rect draws pixels sourced from a 0x0 region on the source surface.

Fixes https://github.com/libsdl-org/SDL/issues/8580
2024-09-25 22:36:55 -07:00
Sam Lantinga 1aea43846e Don't use BlitARGBto555PixelAlpha() for SDL_PIXELFORMAT_ARGB1555
This didn't properly take into account destination alpha.

Fixes https://github.com/libsdl-org/SDL/issues/8401
2024-09-25 21:54:05 -07:00
SDL Wiki Bot 59d69a3ba3 Sync SDL3 wiki -> header 2024-09-26 04:21:40 +00:00
Sam Lantinga d9a7da4fac Optimized SDL_HasEvent() and SDL_HasEvents()
Also document the counting behavior of SDL_PEEKEVENT.

Fixes https://github.com/libsdl-org/SDL/issues/6209
2024-09-25 21:20:00 -07:00
Ryan C. Gordon 3abb213083
opengl: Fixed SDL_RENDERCMD_SETDRAWCOLOR code checking the wrong variable. 2024-09-25 23:14:32 -04:00
Ryan C. Gordon 961cd51611
opengl: Removed a FIXME (this is documented as not-thread-safe now. 2024-09-25 23:14:32 -04:00
Anonymous Maarten 80cf3f7c38 ci: Fix check_stdlib_usage.py and run on ci 2024-09-25 23:59:35 +02:00
Anonymous Maarten 76f28ea120 Fix stdlib usage 2024-09-25 23:59:35 +02:00
Simon McVittie 80da805688 build: Fix testprocess invocation during "as-installed" tests
During build-time testing, we can use `$<TARGET_FILE:childprocess>` to
pass the just-built childprocess executable to it as an argument, but
during "as-installed" testing we need to use the installed path of
the childprocess executable instead.

Signed-off-by: Simon McVittie <smcv@debian.org>
2024-09-25 14:48:26 -07:00
SDL Wiki Bot 81644d260f Sync SDL3 wiki -> header 2024-09-25 20:31:24 +00:00
Ryan C. Gordon 122cd4db2b
include: Added `\threadsafety` notes to all SDL_render.h functions. 2024-09-25 16:30:04 -04:00
SDL Wiki Bot 276969cd58 Sync SDL3 wiki -> header 2024-09-25 20:27:11 +00:00
Ryan C. Gordon 4c48ff51f8 render: SDL_RenderPresent now behaves when a render target is currently set.
It'll temporarily unbind it, draw letterboxing if necessary, present, and
then rebind the previous render target.
2024-09-25 16:26:36 -04:00
Ryan C. Gordon 7a6a0becb8 render: Fixed a FIXME for SDL_SetRenderViewport with a negative size. 2024-09-25 16:26:36 -04:00
Ryan C. Gordon 54459def69 render: Remove the logical presentation render target.
Now we render directly to the window, scaling as appropriate. This fixes some
concerns the render target introduced, like the quality of the final scaled
output, how to step outside of the logical size temporarily to draw some
things sharply at the native resolution, and loss of sub-pixel precision.

Fixes #8736.
2024-09-25 16:26:36 -04:00
Ryan C. Gordon bf7a48cdcc render/gpu: Change some memcpy calls to SDL_memcpy. 2024-09-25 16:26:36 -04:00
Ryan C. Gordon b48f29dd9b examples: Fix name of renderer/17-read-pixels binary. 2024-09-25 16:26:36 -04:00
cosmonaut 925e47a077 GPU: Fix backwards LogError and SetError calls 2024-09-25 12:47:40 -07:00
Anonymous Maarten 1561d7c089 Fix warnings in build-scripts/check_stdlib_usage.py 2024-09-25 20:34:32 +02:00
Anonymous Maarten 2070adb262 android: add python script checking Android JNI bindings 2024-09-25 20:34:32 +02:00
Anonymous Maarten cf4049cfde ci: check versioning on ci 2024-09-25 20:34:32 +02:00
cosmonaut 557c6dfb18 GPU: call SDL_SetError where appropriate 2024-09-25 10:47:14 -07:00
Cameron Gutman 6ec8b1a173 Throttle tickle reports to PS4/PS5 controllers
UpdateDevice() can be called at an arbitrary rate, so we need to
pace ourselves to avoid filling up the rumble queue with these.
2024-09-25 07:20:35 -07:00
Anthony 53bf2baac3 Change JNI calls to comply with recent Boolean changes
Android OpenURL and Toast methods return Booleans now, so let's use the correct interface.
2024-09-24 14:45:24 -07:00
Ryan C. Gordon fcab6c99fb
examples: Fixed some window titles. 2024-09-24 15:36:49 -04:00
Ryan C. Gordon 9881c4e582
examples: Added renderer/17-read-pixels 2024-09-24 15:31:21 -04:00
Ryan C. Gordon 62389ada6f
examples/renderer/02-primitives: seed the RNG. 2024-09-24 13:55:29 -04:00
Ryan C. Gordon 95134f6d58
examples: Added renderer/15-cliprect 2024-09-24 13:55:28 -04:00
Frank Praznik ad3a4c677b
wayland: Clean up cursor scaling
Handle named and custom cursor scaling in a cleaner manner, and account for edge cases where named cursor sizes may not exactly match the required size.
2024-09-24 11:46:56 -04:00
Petar Popovic e5d3a1b6f5 Remove casts from typed pointer to void * for printf %p in test projects 2024-09-24 14:40:32 +03:00
Cameron Gutman 57418475ce kmsdrm: Keep fd around if we can drop master
Modern kernels (v5.8+) allow non-root usage of drmDropMaster(), so
we can hold on to our fd after dropping master on it. This fixes
populating drm_fd in the KMSDRM SysWMinfo when using Vulkan.

Also add a missing error check for open() while we're here
2024-09-24 12:55:02 +03:00
Cameron Gutman 13f88df190 kmsdrm: Fix KMSDRM_Vulkan_CreateSurface() return value 2024-09-23 23:33:15 -05:00
Cameron Gutman 8f55f48337 kmsdrm: Move property initialization a bit further down
KMSDRM_GBMInit() must be called first to set drm_fd and gbm_dev.
2024-09-23 23:00:14 -05:00
Ryan C. Gordon 1ed3dac021
examples: Added renderer/14-viewport
(This intentionally skips a few example numbers, as I intend to fill in some
other topics before this, later.)
2024-09-23 14:16:32 -04:00
Ryan C. Gordon e00ea27d25
examples/renderer/01-clear: No longer needs vsync.
This now chooses the next color based on time, so it won't go wild if the
framerate is unbounded.
2024-09-23 14:16:32 -04:00
Petar Popovic 004ac40226 Fix warning: no function prototype 2024-09-23 10:03:18 -07:00
Ethan Lee 4a3faf20ac gpu: Replace high-level logs with SetError 2024-09-23 10:57:10 -04:00
Petar Popovic 043c876a15 Move default colorspace aliases into enum 2024-09-23 07:37:02 -07:00
mausimus 0685b96469 GPU: fix build when SDL_GPU_DISABLED is set 2024-09-23 08:09:17 -04:00
Ryan C. Gordon e973b687cd
examples: Added renderer/11-color-mods 2024-09-23 01:21:40 -04:00
Susko3 0478a6ee3b Move endian pixel format aliases into enum
Matches the same thing in `SDL_AudioFormat`.
2024-09-22 16:34:42 -07:00
Ryan C. Gordon 1828bde49f
examples/renderer/01-clear: Use the color-cycle code from testvulkan.c
(and testgpu_simple_clear.c, of course!)
2024-09-22 16:10:57 -04:00
Ryan C. Gordon 3bc2bd790c
build-web-examples.pl: Added a FIXME. 2024-09-22 10:35:59 -04:00
Ozkan Sezer b736285053 examples/renderer/08-rotating-textures: Fix compiler warning on MSVC . 2024-09-22 12:02:50 +03:00
Ryan C. Gordon 37d62deca1
examples/renderer/10-geometry: Fixes and cleanups. 2024-09-22 01:15:19 -04:00
Ryan C. Gordon 0758b2a0c4
examples: Added renderer/10-geometry 2024-09-22 01:10:33 -04:00
Ryan C. Gordon 1a90e09262
examples: Added renderer/09-scaling-textures 2024-09-22 01:10:32 -04:00
Ryan C. Gordon 4fdeb6861b
examples: a few renderer fixes. 2024-09-22 01:10:32 -04:00