diff --git a/include/vkd3d.h b/include/vkd3d.h index 5e814217..3ea591ad 100644 --- a/include/vkd3d.h +++ b/include/vkd3d.h @@ -25,12 +25,13 @@ #include "vkd3d_windows.h" #include "d3d12.h" +#include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -typedef BOOL (*vkd3d_signal_event_pfn)(HANDLE event); +typedef bool (*vkd3d_signal_event_pfn)(HANDLE event); struct vkd3d_device_create_info { diff --git a/include/vkd3d_utils.h b/include/vkd3d_utils.h index d7112f26..d2e062f7 100644 --- a/include/vkd3d_utils.h +++ b/include/vkd3d_utils.h @@ -23,7 +23,7 @@ #ifndef __VKD3D_UTILS_H #define __VKD3D_UTILS_H -#include "vkd3d.h" +#include #ifdef __cplusplus extern "C" { @@ -35,7 +35,7 @@ extern "C" { #define INFINITE (~0u) HANDLE vkd3d_create_event(void); -BOOL vkd3d_signal_event(HANDLE event); +bool vkd3d_signal_event(HANDLE event); unsigned int vkd3d_wait_event(HANDLE event, unsigned int milliseconds); void vkd3d_destroy_event(HANDLE event); diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c index 764c633d..af654315 100644 --- a/libs/vkd3d-utils/vkd3d_utils_main.c +++ b/libs/vkd3d-utils/vkd3d_utils_main.c @@ -71,7 +71,7 @@ HANDLE vkd3d_create_event(void) return NULL; } - event->is_signaled = FALSE; + event->is_signaled = false; TRACE("Created event %p.\n", event); @@ -93,8 +93,8 @@ unsigned int vkd3d_wait_event(HANDLE event, unsigned int milliseconds) if (impl->is_signaled || !milliseconds) { - BOOL is_signaled = impl->is_signaled; - impl->is_signaled = FALSE; + bool is_signaled = impl->is_signaled; + impl->is_signaled = false; pthread_mutex_unlock(&impl->mutex); return is_signaled ? WAIT_OBJECT_0 : WAIT_TIMEOUT; } @@ -111,7 +111,7 @@ unsigned int vkd3d_wait_event(HANDLE event, unsigned int milliseconds) } } while (!impl->is_signaled); - impl->is_signaled = FALSE; + impl->is_signaled = false; pthread_mutex_unlock(&impl->mutex); return WAIT_OBJECT_0; } @@ -121,7 +121,7 @@ unsigned int vkd3d_wait_event(HANDLE event, unsigned int milliseconds) return WAIT_FAILED; } -BOOL vkd3d_signal_event(HANDLE event) +bool vkd3d_signal_event(HANDLE event) { struct vkd3d_event *impl = event; int rc; @@ -131,13 +131,13 @@ BOOL vkd3d_signal_event(HANDLE event) if ((rc = pthread_mutex_lock(&impl->mutex))) { ERR("Failed to lock mutex, error %d.\n", rc); - return FALSE; + return false; } - impl->is_signaled = TRUE; + impl->is_signaled = true; pthread_cond_signal(&impl->cond); pthread_mutex_unlock(&impl->mutex); - return TRUE; + return true; } void vkd3d_destroy_event(HANDLE event) diff --git a/libs/vkd3d-utils/vkd3d_utils_private.h b/libs/vkd3d-utils/vkd3d_utils_private.h index 5fd90413..5269e7fc 100644 --- a/libs/vkd3d-utils/vkd3d_utils_private.h +++ b/libs/vkd3d-utils/vkd3d_utils_private.h @@ -24,6 +24,7 @@ #define __VKD3D_UTILS_PRIVATE_H #include +#include #define COBJMACROS #define NONAMELESSUNION