all repos — mgba @ e85bce67e54510b73b6608b680684e916af7c713

mGBA Game Boy Advance Emulator

Merge pull request #137 from lioncash/warn

software renderer: Silence -Wlogical-not-parentheses warnings
endrift jeffrey@endrift.com
Wed, 14 Oct 2015 17:14:26 -0700
commit

e85bce67e54510b73b6608b680684e916af7c713

parent

b597d5197b46e033760c9c1ecc96f075558ec067

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

jump to
M src/gba/renderers/software-bg.csrc/gba/renderers/software-bg.c

@@ -124,7 +124,7 @@ --mosaicWait;

} uint32_t current = *pixel; - if (!objwinSlowPath || !(current & FLAG_OBJWIN) != objwinOnly) { + if (!objwinSlowPath || (!(current & FLAG_OBJWIN)) != objwinOnly) { unsigned mergedFlags = flags; if (current & FLAG_OBJWIN) { mergedFlags = objwinFlags;

@@ -166,7 +166,7 @@ uint32_t current = *pixel;

if (color && IS_WRITABLE(current)) { if (!objwinSlowPath) { _compositeBlendNoObjwin(renderer, pixel, palette[color] | flags, current); - } else if (objwinForceEnable || !(current & FLAG_OBJWIN) == objwinOnly) { + } else if (objwinForceEnable || (!(current & FLAG_OBJWIN)) == objwinOnly) { color_t* currentPalette = (current & FLAG_OBJWIN) ? objwinPalette : palette; unsigned mergedFlags = flags; if (current & FLAG_OBJWIN) {

@@ -213,7 +213,7 @@ --mosaicWait;

} uint32_t current = *pixel; - if (!objwinSlowPath || !(current & FLAG_OBJWIN) != objwinOnly) { + if (!objwinSlowPath || (!(current & FLAG_OBJWIN)) != objwinOnly) { unsigned mergedFlags = flags; if (current & FLAG_OBJWIN) { mergedFlags = objwinFlags;
M src/gba/renderers/software-private.hsrc/gba/renderers/software-private.h

@@ -84,7 +84,7 @@ *pixel = color;

} #define COMPOSITE_16_OBJWIN(BLEND) \ - if (objwinForceEnable || !(current & FLAG_OBJWIN) == objwinOnly) { \ + if (objwinForceEnable || (!(current & FLAG_OBJWIN)) == objwinOnly) { \ unsigned color = (current & FLAG_OBJWIN) ? objwinPalette[paletteData | pixelData] : palette[pixelData]; \ unsigned mergedFlags = flags; \ if (current & FLAG_OBJWIN) { \

@@ -97,7 +97,7 @@ #define COMPOSITE_16_NO_OBJWIN(BLEND) \

_composite ## BLEND ## NoObjwin(renderer, pixel, palette[pixelData] | flags, current); #define COMPOSITE_256_OBJWIN(BLEND) \ - if (objwinForceEnable || !(current & FLAG_OBJWIN) == objwinOnly) { \ + if (objwinForceEnable || (!(current & FLAG_OBJWIN)) == objwinOnly) { \ unsigned color = (current & FLAG_OBJWIN) ? objwinPalette[pixelData] : palette[pixelData]; \ unsigned mergedFlags = flags; \ if (current & FLAG_OBJWIN) { \