WinRT: bug-fix - SDL_SetThreadPriority() didn't work on WinRT 8.x platforms

WinRT 8.0 (Phone and non-Phone) didn't offer an API to set an already-created
thread's priority.  WinRT 8.1 offered this API, along with several other
Win32 thread functions that were previously unavailable (in WinRT).

This change makes WinRT 8.1+ platforms use SDL's Win32 backend.
This commit is contained in:
David Ludwig
2015-11-26 13:51:03 -05:00
parent d07aa877d2
commit fa2d5ab497
8 changed files with 70 additions and 53 deletions

View File

@@ -45,7 +45,11 @@ SDL_CreateMutex(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();
}