diff --git a/src/gba/gba.h b/src/gba/gba.h index aff2120d7..92847c84d 100644 --- a/src/gba/gba.h +++ b/src/gba/gba.h @@ -49,12 +49,6 @@ enum GBALogLevel { 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 { diff --git a/src/gba/renderers/software-mode0.c b/src/gba/renderers/software-mode0.c index 886306072..6ff17e55b 100644 --- a/src/gba/renderers/software-mode0.c +++ b/src/gba/renderers/software-mode0.c @@ -406,7 +406,7 @@ 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) \ diff --git a/src/gba/renderers/video-software.c b/src/gba/renderers/video-software.c index 035ad0c11..8078293c5 100644 --- a/src/gba/renderers/video-software.c +++ b/src/gba/renderers/video-software.c @@ -403,12 +403,10 @@ static void _breakWindowInner(struct GBAVideoSoftwareRenderer* softwareRenderer, 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 @@ static void _breakWindowInner(struct GBAVideoSoftwareRenderer* softwareRenderer, } #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 }