Fixes vulkan redefinition errors:
In file included from /tmp/SDL3/src/video/kmsdrm/.././khronos/vulkan/vulkan.h:11,
from /tmp/SDL3/src/video/kmsdrm/../SDL_vulkan_internal.h:52,
from /tmp/SDL3/src/video/kmsdrm/SDL_kmsdrmvulkan.h:32,
from /tmp/SDL3/src/video/kmsdrm/SDL_kmsdrmvideo.c:44:
/tmp/SDL3/src/video/kmsdrm/.././khronos/vulkan/vulkan_core.h:101: error: redefinition of typedef ‘VkInstance’
/tmp/SDL3/include/SDL3/SDL_vulkan.h:52: note: previous declaration of ‘VkInstance’ was here
In file included from /tmp/SDL3/src/video/kmsdrm/.././khronos/vulkan/vulkan.h:11,
from /tmp/SDL3/src/video/kmsdrm/../SDL_vulkan_internal.h:52,
from /tmp/SDL3/src/video/kmsdrm/SDL_kmsdrmvulkan.h:32,
from /tmp/SDL3/src/video/kmsdrm/SDL_kmsdrmvideo.c:44:
/tmp/SDL3/src/video/kmsdrm/.././khronos/vulkan/vulkan_core.h:7513: error: redefinition of typedef ‘VkSurfaceKHR’
/tmp/SDL3/include/SDL3/SDL_vulkan.h:53: note: previous declaration of ‘VkSurfaceKHR’ was here
make[2]: *** [CMakeFiles/SDL3-shared.dir/src/video/kmsdrm/SDL_kmsdrmvideo.c.o] Error 1
Specifically, SDL_WinRTRunApp, SDL_UIKitRunApp, and SDL_GDKRunApp macros were
removed, as likely unnecessary to SDL3 users. A note was added to the
migration doc about how to roll replacements. These are not going into
SDL_oldnames.h.
Fixes#8245.
GNOME can deliver displays in arbitrary order, which can even change across sleep/wake cycles, so use a DBus method to find the primary display, and try to make sure it is the first exposed by SDL.
On other window managers, continue to assume that the order in which displays are exposed is the preferred order.
This can eventually be replaced by a Wayland protocol that serves the same purpose, if the pending ones are ever finalized.
We don't need to use the hack of setting a timer and waiting for a timer message, MsgWaitForMultipleObjects() will allow us to wait for input directly with a timeout.
Before this change, sleeping for 20 ms would actually sleep for around 30 ms, with this change the sleep time is pretty accurate at 20-21 ms.
At the point that we run this, nothing SDL-specific is set up yet.
__APPLE__ is a compiler predefined macro that forms part of the API on
Apple platforms, so it's fine to rely on it.
This partially reverts commit 31d133db.
Fixes: 31d133db "Define SDL_PLATFORM_* macros instead of underscored ones (#8875)"
Signed-off-by: Simon McVittie <smcv@collabora.com>
These files don't #include SDL headers, so SDL-specific macros will
never be defined here.
This partially reverts commit 31d133db.
Fixes: 31d133db "Define SDL_PLATFORM_* macros instead of underscored ones (#8875)"
Signed-off-by: Simon McVittie <smcv@collabora.com>
These are third-party headers, so it's best if they're identical to the
upstream version rather than using SDL-specific macros or coding style.
This partially reverts commits b6ae281e and 31d133db.
Fixes: 31d133db "Define SDL_PLATFORM_* macros instead of underscored ones (#8875)"
Signed-off-by: Simon McVittie <smcv@collabora.com>
Fixes a crash if no seat was available at initialization, but still allows for one to still be created later if an input device is added.
Removes some unnecessary abstractions in the process.
Mingw seems to have a bad pow implementation in the C runtime:
'Pow(-72.300000,12.000000), expected [20401381050275984310272.000000], got 20401381050275996893184.000000': Failed