#[repr(C)]pub struct SDL_DisplayMode {
pub displayID: SDL_DisplayID,
pub format: SDL_PixelFormat,
pub w: c_int,
pub h: c_int,
pub pixel_density: f32,
pub refresh_rate: f32,
pub refresh_rate_numerator: c_int,
pub refresh_rate_denominator: c_int,
pub internal: *mut SDL_DisplayModeData,
}Expand description
The structure that defines a display mode.
Available Since: This struct is available since SDL 3.2.0.
See Also: SDL_GetFullscreenDisplayModes See Also: SDL_GetDesktopDisplayMode See Also: SDL_GetCurrentDisplayMode See Also: SDL_SetWindowFullscreenMode See Also: SDL_GetWindowFullscreenMode
Fields§
§displayID: SDL_DisplayID< the display this mode is associated with
format: SDL_PixelFormat< pixel format
w: c_int< width
h: c_int< height
pixel_density: f32< scale converting size to pixels (e.g. a 1920x1080 mode with 2.0 scale would have 3840x2160 pixels)
refresh_rate: f32< refresh rate (or 0.0f for unspecified)
refresh_rate_numerator: c_int< precise refresh rate numerator (or 0 for unspecified)
refresh_rate_denominator: c_int< precise refresh rate denominator
internal: *mut SDL_DisplayModeData< Private
Trait Implementations§
Source§impl Clone for SDL_DisplayMode
impl Clone for SDL_DisplayMode
Source§fn clone(&self) -> SDL_DisplayMode
fn clone(&self) -> SDL_DisplayMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SDL_DisplayMode
impl Debug for SDL_DisplayMode
Source§impl Default for SDL_DisplayMode
impl Default for SDL_DisplayMode
impl Copy for SDL_DisplayMode
Auto Trait Implementations§
impl Freeze for SDL_DisplayMode
impl RefUnwindSafe for SDL_DisplayMode
impl !Send for SDL_DisplayMode
impl !Sync for SDL_DisplayMode
impl Unpin for SDL_DisplayMode
impl UnsafeUnpin for SDL_DisplayMode
impl UnwindSafe for SDL_DisplayMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more