[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

@@ -758,16 +758,17 @@ int main_frameThread(void * unused)
break;
}
if (frame->requestActivation)
if (frame->flags && FRAME_FLAG_REQUEST_ACTIVATION)
g_state.ds->requestActivation();
if (g_params.autoScreensaver && g_state.autoIdleInhibitState != frame->blockScreensaver)
const bool blockScreensaver = frame->flags & FRAME_FLAG_BLOCK_SCREENSAVER;
if (g_params.autoScreensaver && g_state.autoIdleInhibitState != blockScreensaver)
{
if (frame->blockScreensaver)
if (blockScreensaver)
g_state.ds->inhibitIdle();
else
g_state.ds->uninhibitIdle();
g_state.autoIdleInhibitState = frame->blockScreensaver;
g_state.autoIdleInhibitState = blockScreensaver;
}
const uint64_t t = nanotime();