Add MonitorHandle::current_video_mode()
This commit is contained in:
parent
1168cd4113
commit
2e53533cc1
12 changed files with 167 additions and 79 deletions
|
|
@ -201,6 +201,12 @@ impl MonitorHandle {
|
|||
self.inner.scale_factor()
|
||||
}
|
||||
|
||||
/// Returns the currently active video mode of this monitor.
|
||||
#[inline]
|
||||
pub fn current_video_mode(&self) -> Option<VideoModeHandle> {
|
||||
self.inner.current_video_mode().map(|video_mode| VideoModeHandle { video_mode })
|
||||
}
|
||||
|
||||
/// Returns all fullscreen video modes supported by this monitor.
|
||||
#[inline]
|
||||
pub fn video_modes(&self) -> impl Iterator<Item = VideoModeHandle> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue