From 1142c86811d95382a50c153e483d161b768578fe Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 7 May 2016 18:38:51 -0400 Subject: [PATCH] Slightly simplified conditional. --- Machines/Atari2600/Atari2600.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Machines/Atari2600/Atari2600.cpp b/Machines/Atari2600/Atari2600.cpp index 0022cdc03..a5113400f 100644 --- a/Machines/Atari2600/Atari2600.cpp +++ b/Machines/Atari2600/Atari2600.cpp @@ -156,8 +156,8 @@ void Machine::get_output_pixel(uint8_t *pixel, int offset) if(playerPixels[0] || missilePixels[0]) outputColour = _playerColour[0]; } - // store colour, if possible - if(pixel) *pixel = outputColour; + // store colour + *pixel = outputColour; } // in imputing the knowledge that all we're dealing with is the rollover from 159 to 0, @@ -237,7 +237,8 @@ void Machine::output_pixels(unsigned int count) } if(_horizontalTimer < (_vBlankExtend ? 152 : 160)) { - get_output_pixel(_outputBuffer ? &_outputBuffer[_lastOutputStateDuration] : nullptr, 159 - _horizontalTimer); + uint8_t throwaway_pixel; + get_output_pixel(_outputBuffer ? &_outputBuffer[_lastOutputStateDuration] : &throwaway_pixel, 159 - _horizontalTimer); // increment all graphics counters increment_object_counter(0);