mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +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:
parent
196050bd23
commit
4a75cc3bcf
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user