From 79dfb8dc8f356834f0b6cf7baf73f77552b08923 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 23 Mar 2023 13:04:38 -0400 Subject: Introduce `Platform::Log` (#1640) * Add Platform::Log and Platform::LogLevel * Replace most printf calls with Platform::Log calls * Move a brace down * Move some log entries to one Log call - Some implementations of Log may assume a full line * Log the MAC address as LogLevel::Info --- src/GPU3D.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/GPU3D.cpp') diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp index b4b9eb2..5c48575 100644 --- a/src/GPU3D.cpp +++ b/src/GPU3D.cpp @@ -22,7 +22,10 @@ #include "NDS.h" #include "GPU.h" #include "FIFO.h" +#include "Platform.h" +using Platform::Log; +using Platform::LogLevel; // 3D engine notes // @@ -2724,7 +2727,7 @@ u8 Read8(u32 addr) } } - printf("unknown GPU3D read8 %08X\n", addr); + Log(LogLevel::Warn, "unknown GPU3D read8 %08X\n", addr); return 0; } @@ -2768,7 +2771,7 @@ u16 Read16(u32 addr) case 0x04000634: return VecTestResult[2]; } - printf("unknown GPU3D read16 %08X\n", addr); + Log(LogLevel::Warn, "unknown GPU3D read16 %08X\n", addr); return 0; } @@ -2872,7 +2875,7 @@ void Write8(u32 addr, u8 val) return; } - printf("unknown GPU3D write8 %08X %02X\n", addr, val); + Log(LogLevel::Warn, "unknown GPU3D write8 %08X %02X\n", addr, val); } void Write16(u32 addr, u16 val) @@ -2959,7 +2962,7 @@ void Write16(u32 addr, u16 val) return; } - printf("unknown GPU3D write16 %08X %04X\n", addr, val); + Log(LogLevel::Warn, "unknown GPU3D write16 %08X %04X\n", addr, val); } void Write32(u32 addr, u32 val) @@ -3056,7 +3059,7 @@ void Write32(u32 addr, u32 val) return; } - printf("unknown GPU3D write32 %08X %08X\n", addr, val); + Log(LogLevel::Warn, "unknown GPU3D write32 %08X %08X\n", addr, val); } Renderer3D::Renderer3D(bool Accelerated) -- cgit v1.2.3