We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bfd9840 + aab6296 commit 3374653Copy full SHA for 3374653
src/sdl2/video.rs
@@ -676,6 +676,19 @@ impl VideoSubsystem {
676
}
677
678
679
+ #[doc(alias = "SDL_GetDisplayUsableBounds")]
680
+ pub fn display_usable_bounds(&self, display_index: i32) -> Result<Rect, String> {
681
+ let mut out = mem::MaybeUninit::uninit();
682
+ let result =
683
+ unsafe { sys::SDL_GetDisplayUsableBounds(display_index as c_int, out.as_mut_ptr()) };
684
+ if result == 0 {
685
+ let out = unsafe { out.assume_init() };
686
+ Ok(Rect::from_ll(out))
687
+ } else {
688
+ Err(get_error())
689
+ }
690
691
+
692
#[doc(alias = "SDL_GetNumDisplayModes")]
693
pub fn num_display_modes(&self, display_index: i32) -> Result<i32, String> {
694
let result = unsafe { sys::SDL_GetNumDisplayModes(display_index as c_int) };
0 commit comments