Rename VideoMode to VideoModeHandle (#3328)

This commit is contained in:
daxpedda 2023-12-26 22:12:33 +01:00 committed by GitHub
parent 34e42ff94d
commit 658f49b014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 111 additions and 104 deletions

View file

@ -1090,11 +1090,11 @@ impl MonitorHandle {
None
}
pub fn video_modes(&self) -> impl Iterator<Item = VideoMode> {
pub fn video_modes(&self) -> impl Iterator<Item = VideoModeHandle> {
let size = self.size().into();
// FIXME this is not the real refresh rate
// (it is guaranteed to support 32 bit color though)
std::iter::once(VideoMode {
std::iter::once(VideoModeHandle {
size,
bit_depth: 32,
refresh_rate_millihertz: 60000,
@ -1104,14 +1104,14 @@ impl MonitorHandle {
}
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct VideoMode {
pub struct VideoModeHandle {
size: (u32, u32),
bit_depth: u16,
refresh_rate_millihertz: u32,
monitor: MonitorHandle,
}
impl VideoMode {
impl VideoModeHandle {
pub fn size(&self) -> PhysicalSize<u32> {
self.size.into()
}