GBA: Clean up non-standard logging a bit

This commit is contained in:
Jeffrey Pfau 2015-07-09 21:55:13 -07:00
parent f6581773d8
commit 1ee5ccd1ff
3 changed files with 4 additions and 12 deletions

View File

@ -49,12 +49,6 @@ enum GBALogLevel {
GBA_LOG_SIO = 0x800, GBA_LOG_SIO = 0x800,
GBA_LOG_ALL = 0xF3F, GBA_LOG_ALL = 0xF3F,
#ifdef NDEBUG
GBA_LOG_DANGER = GBA_LOG_ERROR
#else
GBA_LOG_DANGER = GBA_LOG_FATAL
#endif
}; };
enum GBAKey { enum GBAKey {

View File

@ -406,7 +406,7 @@
return; \ return; \
} \ } \
if (UNLIKELY(end < outX)) { \ 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; \ return; \
} \ } \
DRAW_BACKGROUND_MODE_0_TILE_SUFFIX_ ## BPP (BLEND, OBJWIN) \ DRAW_BACKGROUND_MODE_0_TILE_SUFFIX_ ## BPP (BLEND, OBJWIN) \

View File

@ -403,12 +403,10 @@ static void _breakWindowInner(struct GBAVideoSoftwareRenderer* softwareRenderer,
if (win->h.end >= oldWindow.endX) { if (win->h.end >= oldWindow.endX) {
// Trim off extra windows we've overwritten // Trim off extra windows we've overwritten
for (++activeWindow; softwareRenderer->nWindows > activeWindow + 1 && win->h.end >= softwareRenderer->windows[activeWindow].endX; ++activeWindow) { for (++activeWindow; softwareRenderer->nWindows > activeWindow + 1 && win->h.end >= softwareRenderer->windows[activeWindow].endX; ++activeWindow) {
#ifdef DEBUG if (VIDEO_CHECKS && activeWindow >= MAX_WINDOW) {
if (activeWindow >= MAX_WINDOW) { GBALog(0, GBA_LOG_FATAL, "Out of bounds window write will occur");
GBALog(0, GBA_LOG_DANGER, "Out of bounds window write will occur");
return; return;
} }
#endif
softwareRenderer->windows[activeWindow] = softwareRenderer->windows[activeWindow + 1]; softwareRenderer->windows[activeWindow] = softwareRenderer->windows[activeWindow + 1];
--softwareRenderer->nWindows; --softwareRenderer->nWindows;
} }
@ -428,7 +426,7 @@ static void _breakWindowInner(struct GBAVideoSoftwareRenderer* softwareRenderer,
} }
#ifdef DEBUG #ifdef DEBUG
if (softwareRenderer->nWindows > MAX_WINDOW) { 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 #endif
} }