Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_title seems to interfere with LoopMode::NTimes #973

Open
shroom00 opened this issue Jul 18, 2024 · 0 comments
Open

set_title seems to interfere with LoopMode::NTimes #973

shroom00 opened this issue Jul 18, 2024 · 0 comments

Comments

@shroom00
Copy link

When setting a window's title, the app doesn't process the specified number of updates. I'm unsure if this is specifically due to set_title or if it's the fault of some other underlying issue. I usually reach about 60% of the expected number of updates, although this may vary between devices.

Here's a minimal reproducible example:

use nannou::prelude::*;

struct Model {}

fn main() {
    nannou::app(model).simple_window(view).loop_mode(LoopMode::loop_ntimes(100)).run();
}

fn model(_app: &App) -> Model {
    Model {}
}

fn view(app: &App, _model: &Model, frame: Frame) {
        println!("{}", frame.nth());
        app.main_window().set_title(&format!("{}", frame.nth()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant