Open Clownacy opened 18 hours ago
There isn't a single driver for Windows XP that can support D3D12, or Vulkan for that matter, so I think the actual solution here is to disable GPU by default on Windows versions pre-7.
By avoiding, or dynamically loading, xp incompatible symbols, old school gamers can use "official" binaries and don't have to rebuild. This is important for apps statically linking to SDL3.
Is there a reason we can't just always use CreateEvent()? Do we need the #ifdef
at all?
@chalonverse would know better than me, as they're the one that added the #ifdef
for GDK in the WASAPI backend. This PR just copies that.
Is there a reason we can't just always use CreateEvent()? Do we need the
#ifdef
at all?
I think you might be right. I'm not terribly familiar with Windows APIs so I just used the first thing I saw in an example.
CreateEventEx
is unavailable in Windows XP. The provided solution was sourced from the WASAPI backend, which had to address the same problem.According to official documentation, both calls should be functionally identical, with calls to
CreateEvent
implicitly creating events with theEVENT_ALL_ACCESS
access right.This change alone is not enough to get Windows XP support working again: the usage of
CreateWaitableTimerExW
in the WindowsSDL_systimer.c
currently prevents any executables from running, due to the function being introduced in Windows Vista. If the relevant code is removed, however, executables do successfully run. I would add code to load this function at runtime, similarly to this PR, but there does not appear to be any logic for initialisation and deinitialisation that I could insert the code into.I also corrected a null pointer argument to use
NULL
instead of0
.