Sam Lantinga
1cc85c912b
Check return value of SDL_small_alloc()
...
Fixes https://github.com/libsdl-org/SDL/issues/8959
2024-10-13 14:07:26 -07:00
Sam Lantinga
d7be7fc168
Fixed Cohen-Sutherland out code computation for float line intersection
...
Fixes https://github.com/libsdl-org/SDL/issues/10866
2024-10-13 13:04:59 -07:00
Sam Lantinga
b766c824bd
Don't overwrite the SDL_IOFromFile() error in SDL_LoadBMP()
...
Fixes https://github.com/libsdl-org/SDL/issues/11188
2024-10-13 09:37:44 -07:00
capehill
1a1e2e9892
Set size parameter in SDL_GetClipboardData()
...
Update size value in case where platform uses GetClipboardText().
This should fix clipboard_testClipboardDataFunctions on those platforms.
2024-10-13 08:59:50 -07:00
Cameron Cawley
fd9e57b71e
3DS: Support simple message boxes
2024-10-12 16:07:52 -07:00
Rusty Moyher
7556c44796
SDL3: Fixed Cocoa_GL_CreateContext() not returning a context on success ( #11181 )
2024-10-12 14:01:21 -07:00
Cameron Cawley
fec006a4f9
Allow for more fine tuning of Duff's device routines
2024-10-12 11:16:46 -07:00
Cameron Cawley
aebb64efa1
Remove leftover ARM SIMD code
2024-10-12 11:13:37 -07:00
Cameron Cawley
3e57d996fe
Reduce the size of the SDL_blit_0 alpha code
2024-10-12 08:29:11 -07:00
rhett-lee
22566506d0
SDL3: opengles2 render not support window with transparent flag on Linux/X11 ( #11167 )
2024-10-11 21:59:56 -07:00
Sam Lantinga
3cd7e22e8b
Fixed converting full range YUV to RGB
...
Updated from https://kdashg.github.io/misc/colors/from-coeffs.html
I'm not sure where the other formulas came from, but they weren't mathematically correct and resulted in slightly incorrect colors.
2024-10-11 18:12:05 -07:00
Sam Lantinga
73b995fbad
Don't assume OpenGL on Android
...
This prevents Vulkan from initializing by default.
Fixes https://github.com/libsdl-org/SDL/issues/10279
2024-10-10 10:53:31 -07:00
Sam Lantinga
9023a199dd
Fixed crash in RLE colorkey blitting
...
Fixes Maelstrom running over sdl2-compat with SDL3
2024-10-09 12:11:21 -07:00
Sam Lantinga
f946f87f30
Don't rely on event.buttonMask being set in touchesEnded
...
Fixes https://github.com/libsdl-org/SDL/issues/11131
2024-10-09 11:35:39 -07:00
Sam Lantinga
1f08a03794
Switched drag-n-drop logging to trace level
...
The logging is extremely verbose and covers the entire data exchange process, which is more suited to the trace level.
2024-10-09 07:35:21 -07:00
Ryan C. Gordon
02434cd293
emscripten: Fixes for data addresses above 2gb
...
This includes both wasm64 and wasm32 when addressing more than 2gb of memory.
Fixes : #9052
(Manually cherry-picked from 3deb07ea395373204462130c1e062bc1f71fe060.)
2024-10-08 17:41:18 -04:00
Sam Lantinga
e7ee92e822
Switched drag-n-drop logging to trace level
...
The logging is extremely verbose and covers the entire data exchange process, which is more suited to the trace level.
2024-10-08 10:56:27 -07:00
Jan Sedivy
c2b98e21ba
macOS: Add hint for smooth SDL_EVENT_MOUSE_WHEEL values
2024-10-06 12:36:42 -07:00
Frank Praznik
2fa8acb084
x11: Refresh the global cursor coordinates when confining the pointer
...
XGrabPointer can warp the cursor into the window when confining, so set the flag to refresh the global coordinates when queried.
2024-10-06 14:48:24 -04:00
David Fort
e00b1fdd67
clipboard: include mime types in SDL_ClipboarUpdate
...
This patch modifies the clipboard handling so that when we receive an external
clipboard update, the suppported mime types are included in the SDL_ClipboarUpdate
event. The patch also introduces the owner field that allows to know if the update
is because we own the clipboard (internal update) or if it was an external update.
2024-10-05 18:19:10 -07:00
Sam Lantinga
6c64c62114
Rename SDL_BUTTON() to SDL_BUTTON_MASK()
...
Fixes https://github.com/libsdl-org/SDL/issues/11056
2024-10-04 09:13:59 -07:00
Ryan C. Gordon
9a5d5a2839
video: Improve the EGL attribute callbacks.
...
Now it has access to information it needs and it's clear who is reponsible
for memory management.
Fixes #11039 .
2024-10-03 22:52:52 -07:00
Petar Popovic
020fb6889c
Removed unnecessary const-qualifiers in src and test files
2024-10-03 17:39:08 -04:00
Sam Lantinga
eced9f58a9
Added a userdata parameter for EGL attribute callbacks
...
Fixes https://github.com/libsdl-org/SDL/issues/11013
2024-10-01 11:45:19 -07:00
Anthony
5f5379dc99
Add SDL_IsTV() ( #11004 )
...
Moved SDL_IsAndroidTV() out of public API, to match SDL_IsAndroidTablet().
Added SDL_IsTV(), to mirror existing SDL_IsTablet().
2024-10-01 09:20:00 -07:00
Ryan C. Gordon
0b5e01a305
loadso: library handles are now SDL_SharedObject* instead of void*.
...
Improved the SDL_loadso.h documentation a little, too.
Fixes #11009 .
2024-10-01 12:16:10 -04:00
Sam Lantinga
3234a3b902
Simplified internal SDL_Surface structure
2024-10-01 08:10:04 -07:00
David Fort
818d7d892a
x11: store all atoms in a specific struct
2024-09-30 11:13:08 -07:00
David Fort
801870c8cf
video: cache some more atoms under X11
...
This patch adds the caching of some atoms used by the clipboard.
2024-09-30 11:13:08 -07:00
RT2
06e122103c
Fix window opacity update
2024-09-29 14:08:09 -07:00
Frank Praznik
d0c9c008e1
wayland: Use high-DPI system cursors on non-DPI aware windows
...
Using an unscaled buffer just results in the compositor scaling up the low-res cursor image for output, resulting in it appearing blurry. Always use the scaled cursor to ensure that it appears sharp and matches the native system look.
2024-09-29 13:27:46 -04:00
Frank Praznik
7ca0e9ede1
wayland: Scale the pointer destination size relative to the theme size
...
This better matches compositor behavior and avoids slight size jumps when the cursor enters and leaves the window.
2024-09-28 14:32:10 -04:00
Frank Praznik
d2094bd0a2
wayland: Don't query the cursor info with DBus if the cursor shape protocol is present
...
If the cursor shape protocol is supported, the compositor will handle cursor themes and sizes automatically, so querying the properties with DBus serves no purpose as the values are never used.
2024-09-28 12:18:58 -04:00
Sam Lantinga
3f446d8fb5
Minor cleanup
2024-09-27 14:10:46 -07:00
David Fort
f32e96f5e2
clipboard: add SDL_ClipboardMimeTypes
...
This function allows to retrieve the available mime types without doing any
synthesizing.
2024-09-27 13:38:40 -07:00
Frank Praznik
671a33c2f7
wayland: Raise all touches on a cancel event
2024-09-26 14:45:10 -04:00
Petar Popovic
457d0edeaf
Remove some extra semicolons
2024-09-26 20:01:56 +03: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
Anonymous Maarten
76f28ea120
Fix stdlib usage
2024-09-25 23:59:35 +02: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
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
Petar Popovic
004ac40226
Fix warning: no function prototype
2024-09-23 10:03:18 -07:00
Frank Praznik
fcb8a2c016
wayland: Fix animated cursor timing
...
Adjust the frame timing so it will still advance if the frame callback fires faster than the frame duration.
2024-09-20 14:19:28 -04:00
Sam Lantinga
481203c074
Fixed Xcode warnings
2024-09-18 13:20:53 -07:00
Sam Lantinga
a90ad3b0e2
Removed SDL_bool in favor of plain bool
...
We require stdbool.h in the build environment, so we might as well use the plain bool type.
If your environment doesn't have stdbool.h, this simple replacement will suffice:
typedef signed char bool;
2024-09-18 08:32:30 -07:00
Sam Lantinga
407ccadfd7
Added copyright header to edid.h
2024-09-18 08:18:26 -07:00
Sam Lantinga
bd04459cde
Fix typos (thanks @qndel!)
...
Fix typos in comments and in one case in a returned error ("insuffient -> insufficient" fb273eb )
codespell src/ *.cpp *.h *.hpp --ignore-words-list unknwn,thid,algebric,statics,pixelX,pEvents,caf,ptd,parms,pEvent,parm,TextureRS,TE,HDA,LOD,datas,UE,xwindows,IIF
cd src; git checkout \
events/imKStoUCS.* \
hidapi \
joystick/controller_type.c \
joystick/controller_type.h \
joystick/hidapi/steam/controller_constants.h \
joystick/hidapi/steam/controller_structs.h \
libm \
stdlib/SDL_malloc.c \
stdlib/SDL_qsort.c \
stdlib/SDL_strtokr.c \
video/khronos \
video/x11/edid.h \
video/x11/edid-parse.c \
video/x11/xsettings-client.* \
video/yuv2rgb
2024-09-18 08:18:26 -07:00