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
This commit is contained in:
Jesse Talavera-Greenberg
2023-03-23 13:04:38 -04:00
committed by GitHub
parent 19280cff2d
commit 79dfb8dc8f
50 changed files with 521 additions and 378 deletions

View File

@ -16,7 +16,6 @@
with melonDS. If not, see http://www.gnu.org/licenses/.
*/
#include <stdio.h>
#include <string.h>
#include "NDS.h"
#include "GPU.h"
@ -27,6 +26,9 @@
#include "GPU2D_Soft.h"
using Platform::Log;
using Platform::LogLevel;
namespace GPU
{
@ -987,7 +989,7 @@ void SetPowerCnt(u32 val)
// * bit9: disables engine B palette, OAM and rendering (screen turns white)
// * bit15: screen swap
if (!(val & (1<<0))) printf("!!! CLEARING POWCNT BIT0. DANGER\n");
if (!(val & (1<<0))) Log(LogLevel::Warn, "!!! CLEARING POWCNT BIT0. DANGER\n");
GPU2D_A.SetEnabled(val & (1<<1));
GPU2D_B.SetEnabled(val & (1<<9));