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);
|
guiSizeBuf = C2D_TextBufNew(4096);
|
||||||
|
|
||||||
Textures::Init();
|
Textures::Init();
|
||||||
|
#if defined BUILD_DEBUG
|
||||||
Log::Open();
|
Log::Open();
|
||||||
|
#endif
|
||||||
// Real time services
|
// Real time services
|
||||||
#if !defined BUILD_CITRA
|
#if !defined BUILD_CITRA
|
||||||
mcuHwcInit();
|
mcuHwcInit();
|
||||||
@ -81,7 +82,9 @@ namespace GUI {
|
|||||||
#if !defined BUILD_CITRA
|
#if !defined BUILD_CITRA
|
||||||
mcuHwcExit();
|
mcuHwcExit();
|
||||||
#endif
|
#endif
|
||||||
|
#if defined BUILD_DEBUG
|
||||||
Log::Close();
|
Log::Close();
|
||||||
|
#endif
|
||||||
Textures::Exit();
|
Textures::Exit();
|
||||||
C2D_TextBufDelete(guiSizeBuf);
|
C2D_TextBufDelete(guiSizeBuf);
|
||||||
C2D_TextBufDelete(guiDynamicBuf);
|
C2D_TextBufDelete(guiDynamicBuf);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
namespace Log {
|
namespace Log {
|
||||||
static FS_Archive sdmcArchive;
|
static FS_Archive sdmcArchive;
|
||||||
static Handle handle;
|
static Handle handle = 0;
|
||||||
static u64 offset = 0;
|
static u64 offset = 0;
|
||||||
|
|
||||||
Result Open(void) {
|
Result Open(void) {
|
||||||
@ -45,6 +45,11 @@ namespace Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Error(const char *data, ...) {
|
void Error(const char *data, ...) {
|
||||||
|
// File handle was not open for writing
|
||||||
|
if (!handle) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
char buf[256];
|
char buf[256];
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, data);
|
va_start(args, data);
|
||||||
|
Loading…
Reference in New Issue
Block a user