all repos — mgba @ 0e85739cd3fb239193704a83460b5480e0bd5862

mGBA Game Boy Advance Emulator

Libretro: Disable logging game errors, BIOS calls and stubs in release builds
Jeffrey Pfau jeffrey@endrift.com
Sun, 08 May 2016 12:33:55 -0700
commit

0e85739cd3fb239193704a83460b5480e0bd5862

parent

e75b2928b175191636117ce58b5ea8f9d277f52a

2 files changed, 16 insertions(+), 2 deletions(-)

jump to
M CHANGESCHANGES

@@ -37,6 +37,7 @@ - Qt: Remove some C99isms from C++ code

- Windows: Add native VDir support - All: Add QUIET parameter to silence CMake - GBA Video: Null renderer should return proper register values + - Libretro: Disable logging game errors, BIOS calls and stubs in release builds 0.4.0: (2016-02-02) Features:
M src/platform/libretro/libretro.csrc/platform/libretro/libretro.c

@@ -14,6 +14,8 @@ #include "gb/core.h"

#include "gb/gb.h" #endif #ifdef M_CORE_GBA +#include "gba/bios.h" +#include "gba/core.h" #include "gba/cheats.h" #include "gba/core.h" #include "gba/serialize.h"

@@ -478,14 +480,25 @@ case mLOG_WARN:

retroLevel = RETRO_LOG_WARN; break; case mLOG_INFO: - case mLOG_GAME_ERROR: retroLevel = RETRO_LOG_INFO; break; + case mLOG_GAME_ERROR: + case mLOG_STUB: +#ifdef NDEBUG + return; +#else + retroLevel = RETRO_LOG_DEBUG; + break; +#endif case mLOG_DEBUG: - case mLOG_STUB: retroLevel = RETRO_LOG_DEBUG; break; } +#ifdef NDEBUG + if (category == _mLOG_CAT_GBA_BIOS()) { + return; + } +#endif logCallback(retroLevel, "%s: %s\n", mLogCategoryName(category), message); }