In some cases, conflicts can occur at the platform or driver level if a window initially configured for OpenGL is then used with a Vulkan-based renderer. Try to reconfigure or recreate the window in the unlikely event that it has the OpenGL flag set when initializing the Vulkan or GPU renderer to remove any platform or driver-specific OpenGL objects and properties.
This change also makes it so relative mode doesn't kick in until the mouse enters the window client area. This prevents relative mode from kicking in while clicking and dragging on the title bar, etc.
This adds support for:
* System theme
* Sandbox detection
* Device form factor detection
Many things aren't properly supported yet, but changes and upgrades will happen on the Ubuntu Touch side, so SDL should automatically support more Ubuntu Touch features as time goes.
The immersive-fullscreen code hid the status and navigation bars with the
deprecated View.setSystemUiVisibility() flags plus FLAG_FULLSCREEN. On
Android 15+ (API 35), edge-to-edge is enforced for apps targeting SDK 35+
and those flags are ignored, so the bars never hide (e.g. on a Samsung
S25). Android 14 and below still honour them, which is why older devices
were unaffected.
Hide/show the system bars with WindowInsetsController on API 30+ (using
BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE for sticky-immersive), keeping the
legacy setSystemUiVisibility() path for API < 30. The minimum supported
version is unchanged.
(cherry picked from commit a442367706)
This doesn't _suppress_ the warnings, it annotates our memory access pattern
so ThreadSanitizer knows that threads aren't in conflict, since TSan doesn't
know about io_uring's mechanisms.
Fixes#15083.
External window surfaces can't be destroyed and recreated, so try our best to reconfigure them when switching between GL profiles, or between GL and Vulkan.
- Addresses issue #15115
- mach_absolute_time can be misused for fingerprinting. This is bad.
- Apple docs prefer clock_gettime_nsec_np(CLOCK_UPTIME_RAW) in time.h
- Since HAVE_NANOSLEEP is defined, time.h is included
Before, MetalFence was implemented as simply a busy loop on an atomic
int on metal, meaning the cpu would busy wait on the gpu to finish
taking power from it and decreasing battery life. This was the only kind
of cpu-gpu syncing (apart from requesting a swapchain)