mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-05 18:24:08 +00:00
[common] framebuffer: simplify the remaining
calculation
The pitches match so there is no need for the added complexity of this calculation.
This commit is contained in:
@@ -76,7 +76,7 @@ bool framebuffer_read(const FrameBuffer * frame, void * restrict dst,
|
||||
// copy in large 1MB chunks if the pitches match
|
||||
if (dstpitch == pitch)
|
||||
{
|
||||
size_t remaining = (height - 1) * pitch + dstpitch;
|
||||
size_t remaining = height * pitch;
|
||||
while(remaining)
|
||||
{
|
||||
const size_t copy = remaining < FB_CHUNK_SIZE ? remaining : FB_CHUNK_SIZE;
|
||||
|
Reference in New Issue
Block a user