On Thu Aug 21 08:49:32 2025 +0000, Rémi Bernon wrote:
This could be initialized to 1, or the desktop serial could be initialized to 0, either way there's no reason to make their initial values different.
memset( (void *)shared->keystate, 0, sizeof(shared->keystate) ); shared->keystate_serial = 0; shared->keystate_lock = 0;
I put 0 here (different from desktop possible serial) intentionally because in this place keystate is memset to 0 and not copied from desktop keystate. I guess the logic should be that if the keystate in not synced and not locked the serial should be the same (even if for clarity, if the keystate is synced later after this initialization). Or should we maybe copy the keystate from desktop here instead of memset?