diff --git a/services/gam/src/lib.rs b/services/gam/src/lib.rs index 550f68e8f..a3cfd42f8 100644 --- a/services/gam/src/lib.rs +++ b/services/gam/src/lib.rs @@ -31,6 +31,7 @@ use ime_plugin_api::{ImefCallback, ApiToken}; #[doc = include_str!("../README.md")] +pub const RATE_LIMIT_MS: usize = 33; pub const SYSTEM_STYLE: GlyphStyle = GlyphStyle::Tall; // Add names here and insert them into the EXPECTED_BOOT_CONTEXTS structure below. diff --git a/services/gam/src/main.rs b/services/gam/src/main.rs index 3e3d26fba..9ced5ddb8 100644 --- a/services/gam/src/main.rs +++ b/services/gam/src/main.rs @@ -175,7 +175,7 @@ fn wrapped_main() -> ! { continue; // don't allow any redraws if a powerdown is requested } let elapsed_time = ticktimer.elapsed_ms(); - if elapsed_time - last_time > 33 { // rate limit updates, no point in going faster than the eye can see + if elapsed_time - last_time > gam::RATE_LIMIT_MS as u64 { // rate limit updates, no point in going faster than the eye can see last_time = elapsed_time; if deface(&gfx, &trng, &mut canvases) {