mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-27 00:00:07 -06:00
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:

committed by
GitHub

parent
19280cff2d
commit
79dfb8dc8f
@ -22,6 +22,8 @@
|
||||
#include "SaveManager.h"
|
||||
#include "Platform.h"
|
||||
|
||||
using Platform::Log;
|
||||
using Platform::LogLevel;
|
||||
|
||||
SaveManager::SaveManager(std::string path) : QThread()
|
||||
{
|
||||
@ -122,7 +124,7 @@ void SaveManager::CheckFlush()
|
||||
|
||||
SecondaryBufferLock->lock();
|
||||
|
||||
printf("SaveManager: Flush requested\n");
|
||||
Log(LogLevel::Info, "SaveManager: Flush requested\n");
|
||||
|
||||
if (SecondaryBufferLength != Length)
|
||||
{
|
||||
@ -178,7 +180,7 @@ void SaveManager::FlushSecondaryBuffer(u8* dst, u32 dstLength)
|
||||
FILE* f = Platform::OpenFile(Path, "wb");
|
||||
if (f)
|
||||
{
|
||||
printf("SaveManager: Written\n");
|
||||
Log(LogLevel::Info, "SaveManager: Written\n");
|
||||
fwrite(SecondaryBuffer, SecondaryBufferLength, 1, f);
|
||||
fclose(f);
|
||||
}
|
||||
|
Reference in New Issue
Block a user