... | ... |
@@ -61,9 +61,10 @@ ppu_write(Ppu *p, Uint8 layer, Uint16 x, Uint16 y, Uint8 color) |
61 | 61 |
Uint8 pix = p->pixels[row]; |
62 | 62 |
Uint8 mask = ~(0x3 << shift); |
63 | 63 |
Uint8 pixnew = (pix & mask) + (color << shift); |
64 |
- p->pixels[row] = pixnew; |
|
65 |
- if(pix != pixnew) |
|
64 |
+ if(pix != pixnew){ |
|
65 |
+ p->pixels[row] = pixnew; |
|
66 | 66 |
p->reqdraw = 1; |
67 |
+ } |
|
67 | 68 |
} |
68 | 69 |
} |
69 | 70 |
|