Skip to content

Commit

Permalink
Add warning comment to game-controller.rs example about automatic SDL…
Browse files Browse the repository at this point in the history
…_GameControllerClose call.
  • Loading branch information
kaphula committed Aug 5, 2024
1 parent 48f07af commit d06255d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/game-controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ fn main() -> Result<(), String> {
println!("{} joysticks available", available);

// Iterate over all available joysticks and look for game controllers.
// Notice that the opened game controller instance must be kept alive because
// the controller gets automatically closed on drop.
let mut controller = (0..available)
.find_map(|id| {
if !game_controller_subsystem.is_game_controller(id) {
Expand Down

0 comments on commit d06255d

Please sign in to comment.