WIP: even more crazy linux optimizations
Some checks failed
Deploy Website / deploy (push) Failing after 4m46s
Some checks failed
Deploy Website / deploy (push) Failing after 4m46s
This commit is contained in:
18
src/main.rs
18
src/main.rs
@@ -329,14 +329,11 @@ fn main() -> io::Result<()> {
|
||||
app.flush_queued_changes(&sequencer.cmd_tx);
|
||||
app.flush_dirty_patterns(&sequencer.cmd_tx);
|
||||
|
||||
if app.ui.show_title {
|
||||
app.ui.sparkles.tick(terminal.get_frame().area());
|
||||
}
|
||||
terminal.draw(|frame| views::render(frame, &app, &link, &seq_snapshot))?;
|
||||
|
||||
if event::poll(Duration::from_millis(
|
||||
let had_event = event::poll(Duration::from_millis(
|
||||
app.audio.config.refresh_rate.millis(),
|
||||
))? {
|
||||
))?;
|
||||
|
||||
if had_event {
|
||||
match event::read()? {
|
||||
Event::Key(key) => {
|
||||
let mut ctx = InputContext {
|
||||
@@ -362,6 +359,13 @@ fn main() -> io::Result<()> {
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
if app.playback.playing || had_event || app.ui.show_title {
|
||||
if app.ui.show_title {
|
||||
app.ui.sparkles.tick(terminal.get_frame().area());
|
||||
}
|
||||
terminal.draw(|frame| views::render(frame, &app, &link, &seq_snapshot))?;
|
||||
}
|
||||
}
|
||||
|
||||
disable_raw_mode()?;
|
||||
|
||||
Reference in New Issue
Block a user