File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -337,10 +337,18 @@ void PERF_CRITICAL Scene::clearBuffers() {
337337 // we'd get backcolor's low byte duplicated. Pack two pixels per
338338 // 32-bit store and walk rows so the gradient (if any) actually
339339 // shows up.
340+ // HALF_WIDTH_BUFFERS makes the buffer half-width. FIELD_BUFFERS
341+ // additionally halves the height (each field buffer covers every other
342+ // row). When only HALF_WIDTH_BUFFERS is set the buffer is half-width
343+ // but FULL-height, so rowCount must be screenHeight in that case.
340344 #if HALF_WIDTH_BUFFERS
341345 const int rowPixels = screenWidth / 2 ;
346+ #if FIELD_BUFFERS
342347 const int rowCount = screenHeight / 2 ;
343348 #else
349+ const int rowCount = screenHeight;
350+ #endif
351+ #else
344352 const int rowPixels = screenWidth;
345353 const int rowCount = screenHeight;
346354 #endif
You can’t perform that action at this time.
0 commit comments