Skip to content

Commit ef36e2d

Browse files
committed
hal/gles: allow presenting with Android emulator (gfx-rs#2097)
1 parent 5d90302 commit ef36e2d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

wgpu-hal/src/gles/egl.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,13 @@ fn choose_config(
181181
Ok(Some(config)) => {
182182
if tier_max == 1 {
183183
log::warn!(
184-
"EGL says it can present to the window but not natively. {}. {}",
184+
"EGL says it can present to the window but not natively. {}.",
185185
"This has been confirmed to malfunction on Intel+NV laptops",
186-
"Therefore, we disable presentation entirely for this platform"
187186
);
188187
}
189-
return Ok((config, tier_max >= 2));
188+
// Android emulator can't natively present either.
189+
let tier_threshold = if cfg!(target_os = "android") { 1 } else { 2 };
190+
return Ok((config, tier_max >= tier_threshold));
190191
}
191192
Ok(None) => {
192193
log::warn!("No config found!");

0 commit comments

Comments
 (0)