mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-06 07:20:48 +00:00
Avoid usage of CreateEventEx in WASAPI code
This also uses FALSE as parameters consistently for CreateEvent()
This commit is contained in:
parent
7a3f5ef129
commit
c508396e33
2 changed files with 2 additions and 7 deletions
|
@ -580,12 +580,7 @@ static bool mgmtthrtask_PrepDevice(void *userdata)
|
||||||
IAudioClient *client = device->hidden->client;
|
IAudioClient *client = device->hidden->client;
|
||||||
SDL_assert(client != NULL);
|
SDL_assert(client != NULL);
|
||||||
|
|
||||||
#if defined(SDL_PLATFORM_GDK) // CreateEventEx() arrived in Vista, so we need an #ifdef for XP.
|
device->hidden->event = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||||
device->hidden->event = CreateEventEx(NULL, NULL, 0, EVENT_ALL_ACCESS);
|
|
||||||
#else
|
|
||||||
device->hidden->event = CreateEventW(NULL, 0, 0, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!device->hidden->event) {
|
if (!device->hidden->event) {
|
||||||
return WIN_SetError("WASAPI can't create an event handle");
|
return WIN_SetError("WASAPI can't create an event handle");
|
||||||
}
|
}
|
||||||
|
|
|
@ -6849,7 +6849,7 @@ static D3D12Fence *D3D12_INTERNAL_AcquireFence(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
fence->handle = handle;
|
fence->handle = handle;
|
||||||
fence->event = CreateEvent(NULL, 0, 0, NULL);
|
fence->event = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||||
SDL_SetAtomicInt(&fence->referenceCount, 0);
|
SDL_SetAtomicInt(&fence->referenceCount, 0);
|
||||||
} else {
|
} else {
|
||||||
fence = renderer->availableFences[renderer->availableFenceCount - 1];
|
fence = renderer->availableFences[renderer->availableFenceCount - 1];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue