hw: Migrate logging macros (#3584)

* hw: Migrate logging macros

Use NGLOG instead of LOG prefixed macros for logging

* gpu: Remove unnecessary casting

At first this line without any casting gave an error. Without knowing which argument is causing the error, I just casted everything. After that forgot to check which argument is the one causing trouble.

* hw: Change format specifiers for the one missed
This commit is contained in:
Daniel Lim Wee Soong 2018-03-27 19:02:19 +08:00 committed by Merry
parent 3e8e011c33
commit 7abfdb164b
5 changed files with 64 additions and 58 deletions

View file

@ -21,7 +21,7 @@ inline void Read(T& var, const u32 raw_addr) {
// Reads other than u32 are untested, so I'd rather have them abort than silently fail
if (index >= 0x400 || !std::is_same<T, u32>::value) {
LOG_ERROR(HW_LCD, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, addr);
NGLOG_ERROR(HW_LCD, "unknown Read{} @ {:#010X}", sizeof(var) * 8, addr);
return;
}
@ -35,7 +35,8 @@ inline void Write(u32 addr, const T data) {
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
if (index >= 0x400 || !std::is_same<T, u32>::value) {
LOG_ERROR(HW_LCD, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, addr);
NGLOG_ERROR(HW_LCD, "unknown Write{} {:#010X} @ {:#010X}", sizeof(data) * 8, (u32)data,
addr);
return;
}
@ -65,12 +66,12 @@ template void Write<u8>(u32 addr, const u8 data);
/// Initialize hardware
void Init() {
memset(&g_regs, 0, sizeof(g_regs));
LOG_DEBUG(HW_LCD, "initialized OK");
NGLOG_DEBUG(HW_LCD, "initialized OK");
}
/// Shutdown hardware
void Shutdown() {
LOG_DEBUG(HW_LCD, "shutdown OK");
NGLOG_DEBUG(HW_LCD, "shutdown OK");
}
} // namespace LCD