We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3de6172 commit d753f52Copy full SHA for d753f52
src/sdl2/video.rs
@@ -676,6 +676,20 @@ 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 = unsafe {
683
+ sys::SDL_GetDisplayUsableBounds(display_index as c_int, out.as_mut_ptr())
684
+ };
685
+ if result == 0 {
686
+ let out = unsafe { out.assume_init() };
687
+ Ok(Rect::from_ll(out))
688
+ } else {
689
+ Err(get_error())
690
+ }
691
692
+
693
#[doc(alias = "SDL_GetNumDisplayModes")]
694
pub fn num_display_modes(&self, display_index: i32) -> Result<i32, String> {
695
let result = unsafe { sys::SDL_GetNumDisplayModes(display_index as c_int) };
0 commit comments