mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d-utils: Prefix defines with VKD3D_.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6988513d7b
commit
0ae0e431b1
@ -142,5 +142,6 @@ static inline HRESULT demo_create_root_signature(ID3D12Device *device,
|
||||
#include "demo_win32.h"
|
||||
#else
|
||||
#include <vkd3d_utils.h>
|
||||
#define INFINITE VKD3D_INFINITE
|
||||
#include "demo_xcb.h"
|
||||
#endif
|
||||
|
@ -23,10 +23,10 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define WAIT_OBJECT_0 (0)
|
||||
#define WAIT_TIMEOUT (1)
|
||||
#define WAIT_FAILED (~0u)
|
||||
#define INFINITE (~0u)
|
||||
#define VKD3D_WAIT_OBJECT_0 (0)
|
||||
#define VKD3D_WAIT_TIMEOUT (1)
|
||||
#define VKD3D_WAIT_FAILED (~0u)
|
||||
#define VKD3D_INFINITE (~0u)
|
||||
|
||||
HANDLE vkd3d_create_event(void);
|
||||
HRESULT vkd3d_signal_event(HANDLE event);
|
||||
|
@ -126,7 +126,7 @@ unsigned int vkd3d_wait_event(HANDLE event, unsigned int milliseconds)
|
||||
if ((rc = pthread_mutex_lock(&impl->mutex)))
|
||||
{
|
||||
ERR("Failed to lock mutex, error %d.\n", rc);
|
||||
return WAIT_FAILED;
|
||||
return VKD3D_WAIT_FAILED;
|
||||
}
|
||||
|
||||
if (impl->is_signaled || !milliseconds)
|
||||
@ -134,10 +134,10 @@ unsigned int vkd3d_wait_event(HANDLE event, unsigned int milliseconds)
|
||||
bool is_signaled = impl->is_signaled;
|
||||
impl->is_signaled = false;
|
||||
pthread_mutex_unlock(&impl->mutex);
|
||||
return is_signaled ? WAIT_OBJECT_0 : WAIT_TIMEOUT;
|
||||
return is_signaled ? VKD3D_WAIT_OBJECT_0 : VKD3D_WAIT_TIMEOUT;
|
||||
}
|
||||
|
||||
if (milliseconds == INFINITE)
|
||||
if (milliseconds == VKD3D_INFINITE)
|
||||
{
|
||||
do
|
||||
{
|
||||
@ -145,18 +145,18 @@ unsigned int vkd3d_wait_event(HANDLE event, unsigned int milliseconds)
|
||||
{
|
||||
ERR("Failed to wait on condition variable, error %d.\n", rc);
|
||||
pthread_mutex_unlock(&impl->mutex);
|
||||
return WAIT_FAILED;
|
||||
return VKD3D_WAIT_FAILED;
|
||||
}
|
||||
} while (!impl->is_signaled);
|
||||
|
||||
impl->is_signaled = false;
|
||||
pthread_mutex_unlock(&impl->mutex);
|
||||
return WAIT_OBJECT_0;
|
||||
return VKD3D_WAIT_OBJECT_0;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&impl->mutex);
|
||||
FIXME("Timed wait not implemented yet.\n");
|
||||
return WAIT_FAILED;
|
||||
return VKD3D_WAIT_FAILED;
|
||||
}
|
||||
|
||||
HRESULT vkd3d_signal_event(HANDLE event)
|
||||
|
@ -201,6 +201,10 @@ static void destroy_event(HANDLE event)
|
||||
CloseHandle(event);
|
||||
}
|
||||
#else
|
||||
#define INFINITE VKD3D_INFINITE
|
||||
#define WAIT_OBJECT_0 VKD3D_WAIT_OBJECT_0
|
||||
#define WAIT_TIMEOUT VKD3D_WAIT_TIMEOUT
|
||||
|
||||
static HANDLE create_event(void)
|
||||
{
|
||||
return vkd3d_create_event();
|
||||
|
Loading…
Reference in New Issue
Block a user