[SDK] Add UNIMPLEMENTED_ONCE macro, to be used for functions that spam.

This commit is contained in:
Mark Jansen 2018-01-08 21:06:23 +01:00
parent f319cf950c
commit 81eb3bbceb

View file

@ -117,6 +117,7 @@ RtlAssert(
#endif
#define UNIMPLEMENTED __NOTICE(WARNING, "is UNIMPLEMENTED!\n")
#define UNIMPLEMENTED_ONCE do { static int bWarnedOnce = 0; if (!bWarnedOnce) { bWarnedOnce++; UNIMPLEMENTED; } } while (0)
#define ERR_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL, "(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)
#define WARN_(ch, fmt, ...) DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, "(%s:%d) " fmt, __RELFILE__, __LINE__, ##__VA_ARGS__)
@ -151,6 +152,7 @@ RtlAssert(
#define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define UNIMPLEMENTED
#define UNIMPLEMENTED_ONCE
#define ERR_(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
#define WARN_(ch, ...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)