hal/gles: allow presenting with Android emulator (#2097)

This commit is contained in:
Dzmitry Malyshau authored and Dzmitry Malyshau committed 2021-10-22 09:48:24 -04:00
1 parent 5d9030271a
commit ef36e2de2c
1 file changed
+4 -3
+4 -3
View File
@@ -181,12 +181,13 @@ fn choose_config(
Ok(Some(config)) => {
if tier_max == 1 {
log::warn!(
"EGL says it can present to the window but not natively. {}. {}",
"EGL says it can present to the window but not natively. {}.",
"This has been confirmed to malfunction on Intel+NV laptops",
"Therefore, we disable presentation entirely for this platform"
);
}
return Ok((config, tier_max >= 2));
// Android emulator can't natively present either.
let tier_threshold = if cfg!(target_os = "android") { 1 } else { 2 };
return Ok((config, tier_max >= tier_threshold));
}
Ok(None) => {
log::warn!("No config found!");