Skip to content

Commit

Permalink
Fix Issue #741
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Piolat committed Jan 13, 2024
1 parent 52ce96f commit 3a7b937
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gui/dplug/gui/graphics.d
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,12 @@ protected:
_renderedBuffer.size(_currentUserWidth, _currentUserHeight, border_0, rowAlign_16, xMultiplicity_1, trailingSamples_3);

// Extends final buffer with logical size
size_t sizeNeeded = byteStride(_currentLogicalWidth) * _currentLogicalHeight;
//
// Why one line more with the +1? This is to fixIssue #741 and all other related macOS bugs.
// This workarounds an Apple bug that made a lot of crashed between Nov2022 and Jan2024.
size_t sizeNeeded = byteStride(_currentLogicalWidth) * (_currentLogicalHeight + 1);


_resizedBuffer = cast(ubyte*) alignedRealloc(_resizedBuffer, sizeNeeded, 16);

debug(resizing) debugLogf("<doResize(%d, %d)\n", widthLogicalPixels, heightLogicalPixels);
Expand Down

0 comments on commit 3a7b937

Please sign in to comment.