mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 10:44:01 +00:00
[common] array: add ALIGN_PAD macro for common logic
ALIGN_PAD(x, a) returns x rounded up to the nearest multiple of a.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "common/windebug.h"
|
||||
#include "windows/mousehook.h"
|
||||
#include "windows/force_compose.h"
|
||||
#include "common/array.h"
|
||||
#include "common/option.h"
|
||||
#include "common/framebuffer.h"
|
||||
#include "common/event.h"
|
||||
@@ -449,7 +450,7 @@ static CaptureResult nvfbc_waitFrame(CaptureFrame * frame,
|
||||
this->grabHeight = this->grabInfo.dwHeight;
|
||||
this->grabStride = this->grabInfo.dwBufferWidth;
|
||||
// Round up stride in IVSHMEM to avoid issues with dmabuf import.
|
||||
this->shmStride = (this->grabStride + 0x1F) & ~0x1F;
|
||||
this->shmStride = ALIGN_PAD(this->grabStride, 32);
|
||||
++this->formatVer;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user