Skip to content
Snippets Groups Projects
Commit f2a9a817 authored by Hanicef's avatar Hanicef
Browse files

Fix Windows build

parent 28f196ad
No related branches found
No related tags found
No related merge requests found
......@@ -213,7 +213,9 @@ UINT8 graphics_started = 0;
UINT8 keyboard_started = 0;
static boolean consolevent = false;
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
static boolean framebuffer = false;
#endif
static size_t num_exit_funcs;
static void (*exit_funcs[MAX_EXIT_FUNCS])(void);
......
......@@ -292,10 +292,10 @@ void I_hold_cond(I_cond *cond_anchor, I_mutex mutex_id)
void I_wake_one_cond(I_cond *anchor)
{
EnterCriticalSection(&thread_lock);
if (*cond_anchor == NULL)
if (*anchor == NULL)
{
*cond_anchor = malloc(sizeof(CONDITION_VARIABLE));
InitializeConditionVariable(*cond_anchor);
*anchor = malloc(sizeof(CONDITION_VARIABLE));
InitializeConditionVariable(*anchor);
}
LeaveCriticalSection(&thread_lock);
WakeConditionVariable(*anchor);
......@@ -304,10 +304,10 @@ void I_wake_one_cond(I_cond *anchor)
void I_wake_all_cond(I_cond *anchor)
{
EnterCriticalSection(&thread_lock);
if (*cond_anchor == NULL)
if (*anchor == NULL)
{
*cond_anchor = malloc(sizeof(CONDITION_VARIABLE));
InitializeConditionVariable(*cond_anchor);
*anchor = malloc(sizeof(CONDITION_VARIABLE));
InitializeConditionVariable(*anchor);
}
LeaveCriticalSection(&thread_lock);
WakeAllConditionVariable(*anchor);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment