mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-02 05:12:02 +00:00
[common] lgmp: separate transport configuration
Move LGMP queue tunables into LGMPConfig.h and keep compatibility aliases in KVMFR.h. Promote color-transform, SDR white-level, and damage-limit definitions to transport-neutral common types so non-LGMP transports do not depend on the KVMFR wire format.
This commit is contained in:
@@ -112,6 +112,20 @@ char * lg_strdup(const char *s)
|
||||
return out;
|
||||
}
|
||||
|
||||
void str_copy(char * dst, size_t dstSize, const char * src, size_t srcSize)
|
||||
{
|
||||
if (!dstSize)
|
||||
return;
|
||||
|
||||
const char * end = memchr(src, 0, srcSize);
|
||||
const size_t srcLength = end ? (size_t)(end - src) : srcSize;
|
||||
const size_t copySize = srcLength < dstSize - 1 ?
|
||||
srcLength : dstSize - 1;
|
||||
|
||||
memcpy(dst, src, copySize);
|
||||
dst[copySize] = 0;
|
||||
}
|
||||
|
||||
const char * memsearch(
|
||||
const char * haystack, size_t haystackSize,
|
||||
const char * needle , size_t needleSize ,
|
||||
|
||||
Reference in New Issue
Block a user