From 2b415e642b002f4312ac02f6bfa955960f8bd3b6 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 24 Feb 2026 17:44:51 +0100 Subject: [PATCH] Backends: WebGPU: fixed Emscripten version check. (#8381) Amend ff673d3. --- backends/imgui_impl_wgpu.h | 2 +- docs/CHANGELOG.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backends/imgui_impl_wgpu.h b/backends/imgui_impl_wgpu.h index 522234545..1e026be99 100644 --- a/backends/imgui_impl_wgpu.h +++ b/backends/imgui_impl_wgpu.h @@ -35,7 +35,7 @@ #include #ifdef __EMSCRIPTEN_MAJOR__ -#if (__EMSCRIPTEN_MAJOR__ >= 4) && (__EMSCRIPTEN_MINOR__ >= 0) && (__EMSCRIPTEN_TINY__ >= 10) +#if (__EMSCRIPTEN_MAJOR__ >= 5) || ((__EMSCRIPTEN_MAJOR__ >= 4) && (__EMSCRIPTEN_MINOR__ >= 0) && (__EMSCRIPTEN_TINY__ >= 10)) #define IMGUI_IMPL_WEBGPU_BACKEND_DAWN #else #define IMGUI_IMPL_WEBGPU_BACKEND_WGPU diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index fc15fe0af..a7e880ab8 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -65,6 +65,8 @@ Other Changes: - Clear `DisplayStart`/`DisplayEnd` fields when `Step()` returns false. - Added `UserIndex` helper storage. This is solely a convenience for cases where you may want to carry an index around. +- Backends: + - WebGPU: fixed version check for Emscripten 5.0.0+. - Examples: - Emscripten: added `tabindex=-1` to canvas in our shell_minimal.htm. Without it, the canvas was not focusable in the DOM, which in turn make some backends