Fixed various build and runtime errors when using WinRT with VS2012.
This commit is contained in:
parent
5007e2996e
commit
7ba3100244
11 changed files with 125 additions and 30 deletions
|
@ -79,6 +79,21 @@ SDL_mutexP(SDL_mutex * mutex)
|
|||
}
|
||||
}
|
||||
|
||||
/* TryLock the mutex */
|
||||
int
|
||||
SDL_TryLockMutex(SDL_mutex * mutex)
|
||||
{
|
||||
int retval = 0;
|
||||
if (mutex == NULL) {
|
||||
return SDL_SetError("Passed a NULL mutex");
|
||||
}
|
||||
|
||||
if (mutex->cpp_mutex.try_lock() == false) {
|
||||
retval = SDL_MUTEX_TIMEDOUT;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* Unlock the mutex */
|
||||
extern "C"
|
||||
int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue