Define SDL_PLATFORM_* macros instead of underscored ones (#8875)

This commit is contained in:
Anonymous Maarten
2024-01-24 02:40:51 +01:00
committed by GitHub
parent ceccf24519
commit 31d133db40
208 changed files with 1293 additions and 1138 deletions

View File

@@ -61,7 +61,7 @@ static SDL_sem_impl_t SDL_sem_impl_active = { 0 };
/* https://www.microsoft.com/en-us/download/details.aspx?id=47328 */
#if !SDL_WINAPI_FAMILY_PHONE
#ifdef __WINRT__
#ifdef SDL_PLATFORM_WINRT
/* Functions are guaranteed to be available */
#define pWaitOnAddress WaitOnAddress
#define pWakeByAddressSingle WakeByAddressSingle
@@ -223,7 +223,7 @@ static SDL_Semaphore *SDL_CreateSemaphore_kern(Uint32 initial_value)
if (sem) {
/* Create the semaphore, with max value 32K */
// !!! FIXME: CreateSemaphoreEx is available in Vista and later, so if XP support is dropped, we can lose this #ifdef.
#ifdef __WINRT__
#ifdef SDL_PLATFORM_WINRT
sem->id = CreateSemaphoreEx(NULL, initial_value, 32 * 1024, NULL, 0, SEMAPHORE_ALL_ACCESS);
#else
sem->id = CreateSemaphore(NULL, initial_value, 32 * 1024, NULL);
@@ -331,7 +331,7 @@ SDL_Semaphore *SDL_CreateSemaphore(Uint32 initial_value)
#if !SDL_WINAPI_FAMILY_PHONE
if (!SDL_GetHintBoolean(SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL, SDL_FALSE)) {
#ifdef __WINRT__
#ifdef SDL_PLATFORM_WINRT
/* Link statically on this platform */
impl = &SDL_sem_impl_atom;
#else