kc3-lang/SDL/src/video

Branch :


Log

Author Commit Date CI Message
381f99a3 2021-11-23 10:58:04 Fix warnings: re-add enum forward declaration
dd6817b3 2021-11-23 10:47:34 Fix warnings: static function, {} initializier, un-needed enum forward declaration
fae70349 2021-11-23 10:33:12 Fix warnings: static, include, un-initialized vairables
9c72adc8 2021-11-23 09:41:01 More "Integer overflow generates Illegal instruction under sanitizers" (see bug #4995)
8dd6edec 2021-11-23 09:30:42 Fixed bug #3232 - Integer overflow generates Illegal instruction under sanitizers + see bug #4995
5a7a7ba5 2021-11-22 11:25:59 Don't use "realloc" in comment so that it doesn't show up
c3633d2c 2021-11-22 16:44:48 Haiku: use SDL_malloc
b4aeaa30 2021-11-22 11:20:52 Use SDL_calloc / SDL_free
cb9f85e8 2021-11-22 11:18:01 Don't use "round", so that it's doesn't show up while searching for the function
79b37cc5 2021-11-22 16:43:49 Pandora: use SDL_malloc
10ffcbb1 2021-11-22 16:41:45 QNX: use SDL_malloc
d31251b0 2021-11-21 22:30:48 use SDL's functions version inplace of libc version
c878d9a0 2021-11-22 17:06:41 Haiku: comment this should not be SDL_free()
9fcc630f 2021-11-22 16:37:34 X11: use SDL_malloc
19bf36db 2021-11-22 16:37:19 DirectFB: use SDL_malloc
0445c13a 2021-11-22 16:49:17 Remove 'malloc' from comment
c97b7218 2021-11-21 12:18:10 Added SDL_PremultiplyAlpha() to premultiply alpha on a block of SDL_PIXELFORMAT_ARGB8888 pixels
ceb9e9a8 2021-11-21 00:21:41 cocoa: Removed a debug printf call.
18715acb 2021-11-21 00:14:18 cocoa: Position non-left mouse button events in background windows correctly. Fixes #4828.
23b7bdef 2021-11-20 14:11:30 offscreen: Don't fail to create a window because of driver_loaded politics. Fixes #4922.
665865ed 2021-11-19 09:58:13 If the hardware is in an error state, the final page flip may not come. We should either put a timeout on the wait when destroying the window, or skip it entirely.
a7a54e64 2021-11-18 00:43:55 wayland: Add support for display connect/disconnect events
5cc23868 2021-11-15 11:52:43 wayland: Add support for SDL_DisplayOrientation
cc094f4d 2021-11-14 20:15:48 Fixed building with the macOS 10.8 SDK
1cd3e837 2021-11-14 15:51:38 cocoa: Fix abort on touch event types without a subtype macOS 10.6 has some touch NSEvents which do not have a subtype (Begin/EndGesture, Magnify, Rotate, Swipe) and cause an uncaught exception which triggers SIGABRT and the program exits. As it is, none of the macOS 10.6 touch events are detected as a trackpad (including Gesture due to using different subtypes).
781caec2 2021-11-15 00:55:24 SDL_waylandevents.c (keyboard_handle_keymap): silenced -Wwrite-strings .
8a6e48d4 2021-11-14 04:40:50 constified SDL_RegisterApp()
7dfd22ac 2021-11-14 02:32:00 fix XGetDefault signature - its first and second params are _Xconst
674f361d 2021-11-13 11:44:04 wayland: Fix memory leaks in clipboard code
eb3f1462 2021-11-12 18:26:15 x11: Fix memory leak in X11_CreatePixmapCursor()
3dc7813a 2021-11-12 20:47:02 more whitespace tidy-ups in SDL_os2messagebox.c
c2dd50a9 2021-11-12 08:28:02 Fixed whitespace
074e613b 2021-11-12 03:03:56 Fixed typo
35d90f17 2021-11-12 03:00:57 Better implementation of SDL_SetWindowMouseGrab() and SDL_SetWindowMouseRect() on macOS
3bf7994f 2021-09-27 14:38:12 Add and use `SDL_FALLTHROUGH` for fallthroughs Case fallthrough warnings can be suppressed using the __fallthrough__ compiler attribute. Unfortunately, not all compilers have this attribute, or even have __has_attribute to check if they have the __fallthrough__ attribute. [[fallthrough]] is also available in C++17 and the next C2x, but not everyone uses C++17 or C2x. So define the SDL_FALLTHROUGH macro to deal with those problems - if we are using C++17 or C2x, it expands to [[fallthrough]]; else if the compiler has __has_attribute and has the __fallthrough__ attribute, then it expands to __attribute__((__fallthrough__)); else it expands to an empty statement, with a /* fallthrough */ comment (it's a do {} while (0) statement, because users of this macro need to use a semicolon, because [[fallthrough]] and __attribute__((__fallthrough__)) require a semicolon). Clang before Clang 10 and GCC before GCC 7 have problems with using __attribute__ as a sole statement and warn about a "declaration not declaring anything", so fall back to using the /* fallthrough */ comment if we are using those older compiler versions. Applications using SDL are also free to use this macro (because it is defined in begin_code.h). All existing /* fallthrough */ comments have been replaced with this macro. Some of them were unnecessary because they were the last case in a switch; using SDL_FALLTHROUGH in those cases would result in a compile error on compilers that support __fallthrough__, for having a __attribute__((__fallthrough__)) statement that didn't immediately precede a case label.
abc12a83 2021-11-11 15:58:44 Revert "Add and use `SDL_FALLTHROUGH` for fallthroughs" This reverts commit 66a08aa3914a98667f212e79b4f0b9453203d656. This causes problems with older compilers: https://github.com/libsdl-org/SDL/pull/4791#issuecomment-966630997
63ae103c 2021-11-11 13:16:34 wayland: QTWAYLAND_CONTENT_ORIENTATION can support multiple values as bitmasks
11ae43ca 2021-11-11 07:49:38 Only lock the pointer for mouse relative mode, there isn't really a concept of grab and confinement on iOS Locking the pointer prevents the on-screen cursor from moving, which isn't what we want with a grab behavior. Fixes https://github.com/libsdl-org/SDL/issues/4941
66a08aa3 2021-09-27 14:38:12 Add and use `SDL_FALLTHROUGH` for fallthroughs Case fallthrough warnings can be suppressed using the __fallthrough__ compiler attribute. Unfortunately, not all compilers have this attribute, or even have __has_attribute to check if they have the __fallthrough__ attribute. [[fallthrough]] is also available in C++17 and the next C2x, but not everyone uses C++17 or C2x. So define the SDL_FALLTHROUGH macro to deal with those problems - if we are using C++17 or C2x, it expands to [[fallthrough]]; else if the compiler has __has_attribute and has the __fallthrough__ attribute, then it expands to __attribute__((__fallthrough__)); else it expands to an empty statement, with a /* fallthrough */ comment (it's a do {} while (0) statement, because users of this macro need to use a semicolon, because [[fallthrough]] and __attribute__((__fallthrough__)) require a semicolon). Applications using SDL are also free to use this macro (because it is defined in begin_code.h). All existing /* fallthrough */ comments have been replaced with this macro. Some of them were unnecessary because they were the last case in a switch; using SDL_FALLTHROUGH in those cases would result in a compile error on compilers that support __fallthrough__, for having a __attribute__((__fallthrough__)) statement that didn't immediately precede a case label.
eda4c407 2021-11-10 12:46:54 Make sure the X event is an Xkb event before checking the Xkb event type
98c98362 2021-11-10 11:04:51 Don't clobber the error in SDL_ShowMessageBox() if one has been set at the platform level Fixes https://github.com/libsdl-org/SDL/issues/4760
6c4b4ee7 2021-11-10 09:41:43 Don't assert on API parameters This causes lots of spam in test automation and it's not clear it's useful to developers. If we need this level of validation, we should add a log category for it.
fed85778 2021-11-10 08:47:39 Update the orientation and display modes when the display settings change on Windows Fixes https://github.com/libsdl-org/SDL/issues/1061
c0f1109b 2021-11-10 06:03:01 Implemented querying the orientation of displays on Windows
27ce9144 2021-11-09 20:51:42 Send absolute mouse motion when in normal mouse mode and relative mouse motion when in relative mode on iOS This keeps the SDL cursor in sync with the visible cursor when in normal mouse mode.
19c129fa 2021-11-09 20:32:16 Added documentation that the UIApplicationSupportsIndirectInputEvents key must be set to true in your application's Info.plist in order to get real Bluetooth mouse events.
d2f75636 2021-11-09 11:53:59 When making the window centered it should use windowed mode size since it doesn't affect fullscreen windows Fixes bug https://github.com/libsdl-org/SDL/issues/4750
1fc25bd8 2021-11-08 22:04:34 Properly position the IME window(s) on windows
ae67c7d2 2021-11-09 01:30:00 Implemented SDL_SetWindowMouseRect() on Wayland
18e69827 2021-11-08 22:29:02 Fixed Linux build
881f747d 2021-11-09 13:35:18 Always destroy icon
7fea557b 2021-11-09 12:03:09 SDL_windowsmouse.c: Remove LR_COPYDELETEORG flag
67c42cb4 2021-11-08 22:16:01 Fixed Windows build
fd79607e 2021-11-08 21:34:48 Added SDL_GetWindowMouseRect() Also guarantee that we won't get mouse movement outside the confining area, even if the OS implementation allows it (e.g. macOS)
4db546b0 2021-11-08 20:35:12 Implemented SDL_SetWindowMouseRect() on macOS
9c95c249 2021-11-08 20:01:56 x11: Use XCheckIfEvent() instead of XNextEvent() for thread-safety A racing reader could read from our fd between SDL_IOReady()/X11_Pending() and our call to XNextEvent() which will cause XNextEvent() to block for more data. Avoid this by using XCheckIfEvent() which will never block. This also fixes a bug where we could poll() for data, even when events were already read and pending in the queue. Unlike the Wayland implementation, this isn't totally thread-safe because nothing prevents a racing reader from reading events into the queue between our XCheckIfEvent() and SDL_IOReady() calls, but I think this is the best we can do with Xlib.
2d23d66a 2021-11-08 16:33:50 Fixed SetWindowMouseRect return value on Windows
7d21322d 2021-11-08 16:29:19 Implemented SDL_SetWindowMouseRect() on Windows
4b42c05b 2021-11-08 13:52:48 video: Add SDL_SetWindowMouseRect. This API and implementation comes from the Unreal Engine branch of SDL, which originally called this "SDL_ConfineCursor". Some minor cleanup and changes for consistency with the rest of SDL_video, but there are two major changes: 1. The coordinate system has been changed so that `rect` is _window_ relative and not _screen_ relative, making it easier to implement without having global access to the display. 2. The UE version unset all rects when passing `NULL` as a parameter for `window`, this has been removed as it was an unused feature anyhow. Currently this is only implemented for X, but can be supported on Wayland and Windows at minimum too.
d95a52c9 2021-11-08 09:39:21 Fixed comment typo
fc998b8e 2021-11-08 12:37:10 wayland: Return true for HasScreenKeyboardSupport only if no physical keyboard exists
6c56e275 2021-11-08 07:05:17 Set both _NET_WM_NAME and WM_NAME so SDL windows can be shared in the browser. Fixes https://github.com/libsdl-org/SDL/issues/4924
301819cd 2021-11-08 20:34:20 SDL_windowsmouse.c: Fix WIN_CreateCursor does not scale with system cursor size preference
94c1276a 2021-11-07 20:49:32 emscripten: Decrease vertical scroll speed by using deltaMode Reference issue #4623.
2248a549 2021-11-05 22:48:46 Update the focus in case we changed focus to a child window and then away from the application In this case we'll get WM_KILLFOCUS when the child window is focused, but we'll retain focus on the top level window, but when we Alt-Tab away, we won't get another WM_KILLFOCUS or WM_NCACTIVATE, we get WM_ACTIVATE instead, so we need to check for focus updates in response to that as well.
a01aaf05 2021-10-30 21:42:07 Fixed compiler warning
4d3da5b7 2021-10-26 21:51:29 riscos: Disable the mouse pointer for now
1c256b89 2021-10-26 13:42:34 riscos: Fix enumerating screen modes
5a3c97f3 2021-10-25 22:55:02 riscos: Fix detection of the current mode
53b3db0c 2021-09-28 17:59:16 Handle the KMOD_SCROLL modifier on RISC OS
1268984e 2021-09-09 21:09:50 Implement mouse input on RISC OS
f7f54f0d 2021-08-06 23:38:46 Implement keyboard input on RISC OS Partially based on a patch from http://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fautobuilder%2Flibraries%2Fsdl%2Flibsdl2%2F&rev=7174#a6401c766f408f1ea356e6977894cc6a5 Currently lacks support for mapping scancodes to keycodes.
f8a8ca3e 2021-08-05 23:16:29 Support proper mode switching on RISC OS
fe9bb747 2021-02-12 23:46:11 riscos: Refactor framebuffer code
25c71748 2020-02-13 21:55:08 Add a barebones RISC OS video driver
a5598649 2021-10-30 19:30:34 x11/wayland: Fix signal handling while blocking in WaitEventTimeout() Add a new flag to avoid suppressing EINTR in SDL_IOReady(). Pass the flag in WaitEventTimeout() to ensure that a SIGINT will wake up SDL_WaitEvent() without another event coming in.
c97c4687 2021-10-30 15:56:54 core: Convert SDL_IOReady()'s 2nd parameter to flags
2bf36bfa 2021-10-24 21:28:04 wayland: Implement WaitEventTimeout() and SendWakeupEvent() We can have spurious wakeups in WaitEventTimeout() due to Wayland events that don't end up causing us to generate an SDL event. Fortunately for us, SDL_WaitEventTimeout_Device() handles this situation properly by calling WaitEventTimeout() again with an adjusted timeout.
9c799802 2021-10-26 15:18:26 Vita: fix IME input languages
408a93a1 2021-10-23 15:43:04 wayland: Use multi-thread event reading APIs Wayland provides the prepare_read()/read_events() family of APIs for reading from the display fd in a deadlock-free manner across multiple threads in a multi-threaded application. Let's use those instead of trying to roll our own solution using a mutex. This fixes an issue where a call to SDL_GL_SwapWindow() doesn't swap buffers if it happens to collide with SDL_PumpEvents() in the main thread. It also allows coexistence with other code or toolkits in our process that may want read and dispatch events themselves.
23e252bf 2021-10-02 14:57:40 DirectFB: provide RenderCopyEx via RenderGeometry
f499168c 2021-10-24 15:54:57 x11: Use SDL_IOReady() instead of calling select() directly SDL_IOReady() properly handles EINTR and can use poll() if available.
ba4ef461 2021-10-23 15:28:13 macOS: Fix implicit integer downcast warnings
a76b73dd 2021-10-22 19:04:32 kmsdrm: Use SDL_PremultiplySurfaceAlphaToARGB8888() for cursor surface Instead of taking a direct copy of the mouse cursor surface, and then premultiplying on every BO upload (using the custom legacy_alpha_premultiply_ARGB8888 function), use the new SDL_PremultiplySurfaceAlphaToARGB8888() function, which converts a whole surface at a time, once and save the result. The already-premultiplied data is then copied from that to the BO on each upload, adjusting for the stride (which the previous implementation required to be equal to the width), thereby making the extra copy slightly useful.. This also adds support for non-SDL_PIXELFORMAT_ARGB8888 surfaces.
b528d484 2021-10-22 16:59:46 wayland: Wayland cursors should use premultiplied alpha It turns out that Wayland's WL_SHM_FORMAT_ARGB8888 format (and, indeed, all wayland RGBA formats) should be treated as premultiplied. SDL surfaces tend not to be premultiplied, and this is assumed by other backends when dealing with cursors. This change premultiplies the cursor surface in Wayland_CreateCursor() using the new SDL_PremultiplySurfaceAlphaToARGB8888(). In so doing, it also adds support for a wider range of input surfaces, including those with non-ARGB8888 pixel formats, and those which don't have pitch==width. This should fix #4856
84808ea4 2021-10-22 17:48:32 video: Add SDL_PremultiplySurfaceAlphaToARGB8888() A number of video backends need to get ARGB8888 formatted surfaces with premultiplied alpha, typically for mouse cursors. Add a new function to do this, based loosely on legacy_alpha_premultiply_ARGB8888() from the KMSDRM backend. The new function, SDL_PremultiplySurfaceAlphaToARGB8888() takes two arguments: - src: an SDL_Surface to be converted. - dst: a buffer which is filled with premultiplied ARGB8888 data of the same size as the surface (assuming pitch = w). This is not heavily optimised: it just repeatedly calls SDL_GetRGBA() to do the conversion, but should do for now.
007b5463 2021-10-21 22:50:33 video/uikit: Do not use setNeedsUpdateOfPrefersPointerLocked on iOS SDKs older than 14
19dee1cd 2021-10-22 06:37:20 Add SDL_GetWindowICCProfile(). (#4314) * Add SDL_GetWindowICCProfile * Add new SDL display events * Implement ICC profile change event for macOS * Implement ICC profile notification for Windows * Fix SDL_GetWindowICCProfile() for X11 * Fix compile errors
bfd2f899 2021-10-19 17:29:23 Fixed grab handling when focus changes between windows in the same application
d9c44b65 2021-10-19 10:49:17 Allow Cocoa_VideoInit to succeed when current display mode has invalid flags This fixes a specific issue seen on macOS 10.14.6 where a DELL E248WFP Display connected to a 2014 Mac Mini with a scaled 1920x1080 resolution selected and SDL_Init(SDL_INIT_VIDEO) failed with the error: "The video driver did not add any displays". The underlying cause was that the current 1080p display mode did not have the flag kDisplayModeSafeFlag, the check for which was added in a963e36, with the idea that certain display modes should not be candidates for switching to in fullscreen exclusive mode. That may well be the right thing to do for filtering down a list of candidate modes, but it doesn't pay to be so picky about the current mode. After all, this current mode was set by System Preferences, the picture does appear correctly on screen, and other non-SDL based applications launch and run correctly in this mode. Therefore the fix is to have GetDisplayMode only filter out a mode based on flags if it's part of a candidate list, but if it's the current mode and it can possibly be converted to an SDL_DisplayMode, do so.
649a33ae 2021-10-18 23:00:43 X11: remove redundant 'wakeup_lock' mutex creation
0a0f6854 2021-10-18 14:10:56 SDL_os2video.c: missed replacing a use of libc function
7fb43643 2021-10-17 13:56:31 Don't process WM_INPUT when handling relative mode by warping the mouse cursor
06824b18 2021-10-17 19:50:39 Cleanup windows events after recent changes Improves clarity without any functional changes
50f969c1 2021-10-17 22:02:19 Fixed bug #4841 - Out of bounds read (by 1 byte) in yuvnv12_rgb24_sseu
1c5b3e0e 2021-10-15 18:12:18 Don't center the mouse when gaining focus unless we're using relative mode warping This is necessary now that we actually change the mouse position when calling SDL_WarpMouseInWindow() in relative mode.
a70a94e0 2021-10-15 18:11:19 Don't send a mouse leave event if the mouse is outside the window when gaining focus and in relative mode.
c583055a 2021-10-15 10:11:24 SDL_windowsevents.c (WIN_WindowProc): remove SAFE_AREA_X and SAFE_AREA_Y Not used since commit https://github.com/libsdl-org/SDL/commit/a1fabca162091b50d6f7dd71879d028319e09d80
a1fabca1 2021-10-14 16:52:21 Removed mouse warping for local mice and improved warp handling for mouse over RDP
5e89b3c8 2021-10-14 11:46:07 Don't need to use raw input to track the mouse during mouse capture (thanks Brick!)