This commit is contained in:
2026-01-21 17:05:30 +01:00
commit 67322381c3
59 changed files with 10421 additions and 0 deletions

21
src/state/live_keys.rs Normal file
View File

@@ -0,0 +1,21 @@
use std::sync::atomic::{AtomicBool, Ordering};
#[derive(Default)]
pub struct LiveKeyState {
fill: AtomicBool,
}
impl LiveKeyState {
pub fn new() -> Self {
Self::default()
}
pub fn fill(&self) -> bool {
self.fill.load(Ordering::Relaxed)
}
pub fn flip_fill(&self) {
let current = self.fill.load(Ordering::Relaxed);
self.fill.store(!current, Ordering::Relaxed);
}
}