mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-18 07:41:45 +00:00
removed WinRT support.
This commit is contained in:
@@ -44,19 +44,12 @@ SDL_mutex_impl_t SDL_mutex_impl_active = {0};
|
||||
* Implementation based on Slim Reader/Writer (SRW) Locks for Win 7 and newer.
|
||||
*/
|
||||
|
||||
#if __WINRT__
|
||||
/* Functions are guaranteed to be available */
|
||||
#define pReleaseSRWLockExclusive ReleaseSRWLockExclusive
|
||||
#define pAcquireSRWLockExclusive AcquireSRWLockExclusive
|
||||
#define pTryAcquireSRWLockExclusive TryAcquireSRWLockExclusive
|
||||
#else
|
||||
typedef VOID(WINAPI *pfnReleaseSRWLockExclusive)(PSRWLOCK);
|
||||
typedef VOID(WINAPI *pfnAcquireSRWLockExclusive)(PSRWLOCK);
|
||||
typedef BOOLEAN(WINAPI *pfnTryAcquireSRWLockExclusive)(PSRWLOCK);
|
||||
static pfnReleaseSRWLockExclusive pReleaseSRWLockExclusive = NULL;
|
||||
static pfnAcquireSRWLockExclusive pAcquireSRWLockExclusive = NULL;
|
||||
static pfnTryAcquireSRWLockExclusive pTryAcquireSRWLockExclusive = NULL;
|
||||
#endif
|
||||
|
||||
static SDL_mutex *
|
||||
SDL_CreateMutex_srw(void)
|
||||
@@ -180,11 +173,7 @@ SDL_CreateMutex_cs(void)
|
||||
if (mutex) {
|
||||
/* Initialize */
|
||||
/* On SMP systems, a non-zero spin count generally helps performance */
|
||||
#if __WINRT__
|
||||
InitializeCriticalSectionEx(&mutex->cs, 2000, 0);
|
||||
#else
|
||||
InitializeCriticalSectionAndSpinCount(&mutex->cs, 2000);
|
||||
#endif
|
||||
} else {
|
||||
SDL_OutOfMemory();
|
||||
}
|
||||
@@ -267,10 +256,6 @@ SDL_CreateMutex(void)
|
||||
const SDL_mutex_impl_t * impl = &SDL_mutex_impl_cs;
|
||||
|
||||
if (!SDL_GetHintBoolean(SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS, SDL_FALSE)) {
|
||||
#if __WINRT__
|
||||
/* Link statically on this platform */
|
||||
impl = &SDL_mutex_impl_srw;
|
||||
#else
|
||||
/* Try faster implementation for Windows 7 and newer */
|
||||
HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
|
||||
if (kernel32) {
|
||||
@@ -283,7 +268,6 @@ SDL_CreateMutex(void)
|
||||
impl = &SDL_mutex_impl_srw;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Copy instead of using pointer to save one level of indirection */
|
||||
|
Reference in New Issue
Block a user