winrt: Don't reference generic Condition Variables at all.
It always has the SRWLOCK implementation available to it, so let the linker throw away the generic version if possible.main
parent
736f9fb9b9
commit
70a501d8ec
|
@ -194,10 +194,9 @@ static const SDL_cond_impl_t SDL_cond_impl_cv = {
|
||||||
&SDL_CondWaitTimeoutNS_cv,
|
&SDL_CondWaitTimeoutNS_cv,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Generic Condition Variable implementation using SDL_mutex and SDL_sem
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
#ifndef __WINRT__
|
||||||
|
/* Generic Condition Variable implementation using SDL_mutex and SDL_sem */
|
||||||
static const SDL_cond_impl_t SDL_cond_impl_generic = {
|
static const SDL_cond_impl_t SDL_cond_impl_generic = {
|
||||||
&SDL_CreateCond_generic,
|
&SDL_CreateCond_generic,
|
||||||
&SDL_DestroyCond_generic,
|
&SDL_DestroyCond_generic,
|
||||||
|
@ -205,13 +204,13 @@ static const SDL_cond_impl_t SDL_cond_impl_generic = {
|
||||||
&SDL_CondBroadcast_generic,
|
&SDL_CondBroadcast_generic,
|
||||||
&SDL_CondWaitTimeoutNS_generic,
|
&SDL_CondWaitTimeoutNS_generic,
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
SDL_cond *
|
SDL_cond *
|
||||||
SDL_CreateCond(void)
|
SDL_CreateCond(void)
|
||||||
{
|
{
|
||||||
if (SDL_cond_impl_active.Create == NULL) {
|
if (SDL_cond_impl_active.Create == NULL) {
|
||||||
/* Default to generic implementation, works with all mutex implementations */
|
const SDL_cond_impl_t *impl = NULL;
|
||||||
const SDL_cond_impl_t *impl = &SDL_cond_impl_generic;
|
|
||||||
|
|
||||||
if (SDL_mutex_impl_active.Type == SDL_MUTEX_INVALID) {
|
if (SDL_mutex_impl_active.Type == SDL_MUTEX_INVALID) {
|
||||||
/* The mutex implementation isn't decided yet, trigger it */
|
/* The mutex implementation isn't decided yet, trigger it */
|
||||||
|
@ -228,6 +227,8 @@ SDL_CreateCond(void)
|
||||||
/* Link statically on this platform */
|
/* Link statically on this platform */
|
||||||
impl = &SDL_cond_impl_cv;
|
impl = &SDL_cond_impl_cv;
|
||||||
#else
|
#else
|
||||||
|
/* Default to generic implementation, works with all mutex implementations */
|
||||||
|
impl = &SDL_cond_impl_generic;
|
||||||
{
|
{
|
||||||
HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
|
HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
|
||||||
if (kernel32) {
|
if (kernel32) {
|
||||||
|
|
Loading…
Reference in New Issue