mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Add CreationError::NoAvailablePixelFormat
This commit is contained in:
parent
43dabf131a
commit
57a1d546e7
|
@ -603,7 +603,7 @@ impl Window {
|
||||||
Err(CreationError::NotSupported)
|
Err(CreationError::NotSupported)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Err(CreationError::NotSupported)
|
Err(CreationError::NoAvailablePixelFormat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -573,5 +573,5 @@ fn choose_dummy_pixel_format<I>(iter: I) -> Result<libc::c_int, CreationError>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
backup_id.ok_or(CreationError::NotSupported)
|
backup_id.ok_or(CreationError::OsError("No available pixel format".to_string()))
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,7 @@ pub enum CreationError {
|
||||||
NotSupported,
|
NotSupported,
|
||||||
RobustnessNotSupported,
|
RobustnessNotSupported,
|
||||||
OpenGlVersionNotSupported,
|
OpenGlVersionNotSupported,
|
||||||
|
NoAvailablePixelFormat,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CreationError {
|
impl CreationError {
|
||||||
|
@ -122,6 +123,8 @@ impl CreationError {
|
||||||
not supported.",
|
not supported.",
|
||||||
CreationError::OpenGlVersionNotSupported => "The requested OpenGL version is not \
|
CreationError::OpenGlVersionNotSupported => "The requested OpenGL version is not \
|
||||||
supported.",
|
supported.",
|
||||||
|
CreationError::NoAvailablePixelFormat => "Couldn't find any pixel format that matches \
|
||||||
|
the criterias.",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -471,7 +474,7 @@ impl<'a> BuilderAttribs<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
current_result.or(current_software_result)
|
current_result.or(current_software_result)
|
||||||
.ok_or(CreationError::NotSupported)
|
.ok_or(CreationError::NoAvailablePixelFormat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue