libs/vkd3d: Support both native and Win32 wchar_t.

This commit is contained in:
Henri Verbeet
2017-08-02 10:45:06 +02:00
parent 1f51eebe12
commit 3019a3e8f1
10 changed files with 122 additions and 16 deletions

View File

@@ -37,7 +37,7 @@ void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function,
const char *vkd3d_dbg_sprintf(const char *fmt, ...) VKD3D_PRINTF_FUNC(1, 2) DECLSPEC_HIDDEN;
const char *debugstr_a(const char *str) DECLSPEC_HIDDEN;
const char *debugstr_w(const WCHAR *wstr) DECLSPEC_HIDDEN;
const char *debugstr_w(const WCHAR *wstr, size_t wchar_size) DECLSPEC_HIDDEN;
#define VKD3D_DBG_LOG(level) \
do { \

View File

@@ -34,6 +34,7 @@ struct vkd3d_device_create_info
{
D3D_FEATURE_LEVEL minimum_feature_level;
vkd3d_signal_event_pfn signal_event_pfn;
size_t wchar_size;
};
/* resource flags */

View File

@@ -21,6 +21,10 @@
#if !defined(_WIN32) || defined(__WIDL__)
# if !defined(__WIDL__) && !defined(VKD3D_WIN32_WCHAR)
# include <wchar.h>
# endif
# ifdef __GNUC__
# define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
# endif
@@ -72,7 +76,11 @@ typedef unsigned long ULONG_PTR;
typedef ULONG_PTR SIZE_T;
# ifdef VKD3D_WIN32_WCHAR
typedef unsigned short WCHAR;
# else
typedef wchar_t WCHAR;
# endif /* VKD3D_WIN32_WCHAR */
typedef void *HANDLE;
/* GUID */