vkd3d: Allow disabling ERR() by defining VKD3D_NO_ERROR_MESSAGES.

This commit is contained in:
Giovanni Mascellani 2024-07-26 11:04:06 +02:00 committed by Henri Verbeet
parent 60ecf8c12b
commit 021a7f030a
Notes: Henri Verbeet 2024-07-29 13:23:46 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Conor McCarthy (@cmccarthy)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/867

View File

@ -126,6 +126,10 @@ VKD3D_NORETURN static inline void vkd3d_unreachable_(const char *filename, unsig
#define FIXME_ONCE(args...) do { } while (0)
#endif
#ifdef VKD3D_NO_ERROR_MESSAGES
#define ERR(args...) do { } while (0)
#endif
enum vkd3d_dbg_level
{
VKD3D_DBG_LEVEL_NONE,
@ -174,7 +178,9 @@ const char *debugstr_w(const WCHAR *wstr, size_t wchar_size);
#define FIXME VKD3D_DBG_LOG(FIXME)
#endif
#ifndef ERR
#define ERR VKD3D_DBG_LOG(ERR)
#endif
#ifndef TRACE_ON
#define TRACE_ON() (vkd3d_dbg_get_level() == VKD3D_DBG_LEVEL_TRACE)