Merge pull request #1245 from PatrickvL/log_mask
Log masks with their actual value
This commit is contained in:
commit
de7d2929b7
|
@ -342,9 +342,10 @@ extern thread_local std::string _logPrefix;
|
||||||
|
|
||||||
// Macro's for Flags-ToString conversions :
|
// Macro's for Flags-ToString conversions :
|
||||||
#define FLAGS2STR_HEADER(FlagType) LOGRENDER_HEADER_BY_REF(FlagType);
|
#define FLAGS2STR_HEADER(FlagType) LOGRENDER_HEADER_BY_REF(FlagType);
|
||||||
#define FLAGS2STR_START(FlagType) std::string TYPE2PCHAR(FlagType)(const FlagType &value) { std::string res;
|
#define FLAGS2STR_START(FlagType) std::string TYPE2PCHAR(FlagType)(const FlagType &value) { std::stringstream ss;
|
||||||
#define FLAG2STR(f) if (((uint32)value & f) == f) res = res + #f"|";
|
#define FLAG2STR(f) if (((uint32)value & f) == f) ss << #f << "|";
|
||||||
#define FLAGS2STR_END if (!res.empty()) res.pop_back(); return res; }
|
#define FLAG2STR_MASK(f) ss << #f"=" << (value & f) << "|";
|
||||||
|
#define FLAGS2STR_END std::string res = ss.str(); if (!res.empty()) res.pop_back(); return res; }
|
||||||
#define FLAGS2STR_END_and_LOGRENDER(FlagType) FLAGS2STR_END LOGRENDER_TYPE(FlagType)
|
#define FLAGS2STR_END_and_LOGRENDER(FlagType) FLAGS2STR_END LOGRENDER_TYPE(FlagType)
|
||||||
|
|
||||||
// Macro's for Struct-member rendering :
|
// Macro's for Struct-member rendering :
|
||||||
|
|
|
@ -504,7 +504,7 @@ FLAGS2STR_END_and_LOGRENDER(D3DTEXOPCAPS)
|
||||||
|
|
||||||
// FVFCaps
|
// FVFCaps
|
||||||
FLAGS2STR_START(D3DFVFCAPS)
|
FLAGS2STR_START(D3DFVFCAPS)
|
||||||
FLAG2STR(D3DFVFCAPS_TEXCOORDCOUNTMASK)
|
FLAG2STR_MASK(D3DFVFCAPS_TEXCOORDCOUNTMASK)
|
||||||
FLAG2STR(D3DFVFCAPS_DONOTSTRIPELEMENTS)
|
FLAG2STR(D3DFVFCAPS_DONOTSTRIPELEMENTS)
|
||||||
FLAG2STR(D3DFVFCAPS_PSIZE)
|
FLAG2STR(D3DFVFCAPS_PSIZE)
|
||||||
FLAGS2STR_END_and_LOGRENDER(D3DFVFCAPS)
|
FLAGS2STR_END_and_LOGRENDER(D3DFVFCAPS)
|
||||||
|
|
Loading…
Reference in New Issue