Skip to content

fix: fallback to selecting first controller during refresh, if None selected#139

Merged
sermuns merged 1 commit into
masterfrom
blank-after-resume-from-suspend
Apr 16, 2026
Merged

fix: fallback to selecting first controller during refresh, if None selected#139
sermuns merged 1 commit into
masterfrom
blank-after-resume-from-suspend

Conversation

@sermuns
Copy link
Copy Markdown
Collaborator

@sermuns sermuns commented Apr 15, 2026

Fixes #116.

Comment thread src/app.rs
Comment on lines +812 to +817
// Coming from having NO adapters (e.g. having suspended), no adapter is selected.
// This makes it fallback select the FIRST controller.
// TODO: ideally we would remember what controller was selected before...
if self.controllers.is_empty() && self.controller_state.selected().is_none() {
self.controller_state.select_first();
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super-happy about falling back to first controller. I guess most people only have one bluetooth controller so maybe it doesn't matter.

@sermuns sermuns merged commit 1435e67 into master Apr 16, 2026
2 checks passed
@sermuns sermuns deleted the blank-after-resume-from-suspend branch April 16, 2026 19:51
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

Successfully merging this pull request may close these issues.

TUI is blank after resuming from suspend

1 participant