mirror of
https://github.com/forkless/NotAlterra.git
synced 2026-08-16 08:36:37 +02:00
Reduce event poll to 16ms for smooth whale animation
This commit is contained in:
+1
-1
@@ -1013,7 +1013,7 @@ fn get_config_path<B: Backend>(_terminal: &mut Terminal<B>, app: &mut App) -> Re
|
||||
/// Key-repeat and initial press are both accepted.
|
||||
fn read_key_event() -> Result<crossterm::event::KeyEvent> {
|
||||
loop {
|
||||
if event::poll(std::time::Duration::from_millis(100))? {
|
||||
if event::poll(std::time::Duration::from_millis(16))? {
|
||||
if let Event::Key(key) = event::read()? {
|
||||
if key.kind != KeyEventKind::Release {
|
||||
return Ok(key);
|
||||
|
||||
Reference in New Issue
Block a user