mirror of
https://github.com/joel16/3DSident.git
synced 2024-11-26 21:10:24 +00:00
logs: Don't create logs on non debug builds
This commit is contained in:
parent
ba3d5e0529
commit
32ba683bfb
@ -61,8 +61,9 @@ namespace GUI {
|
||||
guiSizeBuf = C2D_TextBufNew(4096);
|
||||
|
||||
Textures::Init();
|
||||
#if defined BUILD_DEBUG
|
||||
Log::Open();
|
||||
|
||||
#endif
|
||||
// Real time services
|
||||
#if !defined BUILD_CITRA
|
||||
mcuHwcInit();
|
||||
@ -81,7 +82,9 @@ namespace GUI {
|
||||
#if !defined BUILD_CITRA
|
||||
mcuHwcExit();
|
||||
#endif
|
||||
#if defined BUILD_DEBUG
|
||||
Log::Close();
|
||||
#endif
|
||||
Textures::Exit();
|
||||
C2D_TextBufDelete(guiSizeBuf);
|
||||
C2D_TextBufDelete(guiDynamicBuf);
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
namespace Log {
|
||||
static FS_Archive sdmcArchive;
|
||||
static Handle handle;
|
||||
static Handle handle = 0;
|
||||
static u64 offset = 0;
|
||||
|
||||
Result Open(void) {
|
||||
@ -45,6 +45,11 @@ namespace Log {
|
||||
}
|
||||
|
||||
void Error(const char *data, ...) {
|
||||
// File handle was not open for writing
|
||||
if (!handle) {
|
||||
return;
|
||||
}
|
||||
|
||||
char buf[256];
|
||||
va_list args;
|
||||
va_start(args, data);
|
||||
|
Loading…
Reference in New Issue
Block a user