Skip to content

Commit

Permalink
Merge pull request #1386 from MichaelJ10/patch-1
Browse files Browse the repository at this point in the history
Added a SDL_SetWindowResizable for sdl2::video::Window
  • Loading branch information
Cobrand authored Jun 13, 2024
2 parents 726613e + bc34736 commit c02e391
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/sdl2/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,18 @@ impl Window {
Ok(())
}

#[doc(alias = "SDL_SetWindowResizable")]
pub fn set_resizable(&mut self, resizable: bool) {
let resizable = if resizable {
SDL_bool::SDL_TRUE
} else {
SDL_bool::SDL_FALSE
};
unsafe {
sys::SDL_SetWindowResizable(self.context.raw, resizable);
}
}

/// Set the shape of the window
/// To be effective:
/// - shaped must have been set using windows builder
Expand Down

0 comments on commit c02e391

Please sign in to comment.