[all] convert KVMFR frame bools to flags in a bitfield

This will allow us to add additional flags in the future while remaining
backwards compatible with the host.
This commit is contained in:
Geoffrey McRae
2022-02-10 20:32:38 +11:00
parent 29698362ed
commit 8b4551c39c
3 changed files with 20 additions and 9 deletions

View File

@@ -275,8 +275,11 @@ static bool sendFrame(void)
fi->stride = frame.stride;
fi->pitch = frame.pitch;
fi->offset = app.pageSize - FrameBufferStructSize;
fi->blockScreensaver = os_blockScreensaver();
fi->requestActivation = os_getAndClearPendingActivationRequest();
fi->flags =
(os_blockScreensaver() ?
FRAME_FLAG_BLOCK_SCREENSAVER : 0) |
(os_getAndClearPendingActivationRequest() ?
FRAME_FLAG_REQUEST_ACTIVATION : 0);
app.frameValid = true;
fi->damageRectsCount = frame.damageRectsCount;