mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
expose the GAM minimum redraw period
this could be useful for functions that have to rapidly toggle events on the screen and want to make sure that the last event actually is rendered.
This commit is contained in:
parent
d4a934785b
commit
ae7ee770ee
2 changed files with 2 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue