all repos — mgba @ 1ee5ccd1ff4b08ed4aedb108938198e8bff26d59

mGBA Game Boy Advance Emulator

GBA: Clean up non-standard logging a bit
Jeffrey Pfau jeffrey@endrift.com
Thu, 09 Jul 2015 21:55:13 -0700
commit

1ee5ccd1ff4b08ed4aedb108938198e8bff26d59

parent

f6581773d8e33d1e600a5d2fb615f36023711126

3 files changed, 4 insertions(+), 12 deletions(-)

jump to
M src/gba/gba.hsrc/gba/gba.h

@@ -49,12 +49,6 @@ GBA_LOG_STATUS = 0x400,

GBA_LOG_SIO = 0x800, GBA_LOG_ALL = 0xF3F, - -#ifdef NDEBUG - GBA_LOG_DANGER = GBA_LOG_ERROR -#else - GBA_LOG_DANGER = GBA_LOG_FATAL -#endif }; enum GBAKey {
M src/gba/renderers/software-mode0.csrc/gba/renderers/software-mode0.c

@@ -406,7 +406,7 @@ if (UNLIKELY(end == outX)) { \

return; \ } \ if (UNLIKELY(end < outX)) { \ - GBALog(0, GBA_LOG_DANGER, "Out of bounds background draw!"); \ + GBALog(0, GBA_LOG_FATAL, "Out of bounds background draw!"); \ return; \ } \ DRAW_BACKGROUND_MODE_0_TILE_SUFFIX_ ## BPP (BLEND, OBJWIN) \
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -403,12 +403,10 @@ softwareRenderer->windows[activeWindow].endX = win->h.end;

if (win->h.end >= oldWindow.endX) { // Trim off extra windows we've overwritten for (++activeWindow; softwareRenderer->nWindows > activeWindow + 1 && win->h.end >= softwareRenderer->windows[activeWindow].endX; ++activeWindow) { -#ifdef DEBUG - if (activeWindow >= MAX_WINDOW) { - GBALog(0, GBA_LOG_DANGER, "Out of bounds window write will occur"); + if (VIDEO_CHECKS && activeWindow >= MAX_WINDOW) { + GBALog(0, GBA_LOG_FATAL, "Out of bounds window write will occur"); return; } -#endif softwareRenderer->windows[activeWindow] = softwareRenderer->windows[activeWindow + 1]; --softwareRenderer->nWindows; }

@@ -428,7 +426,7 @@ }

} #ifdef DEBUG if (softwareRenderer->nWindows > MAX_WINDOW) { - GBALog(0, GBA_LOG_ABORT, "Out of bounds window write occurred!"); + GBALog(0, GBA_LOG_FATAL, "Out of bounds window write occurred!"); } #endif }