diff options
| author | Morten Sørvig <morten.sorvig@qt.io> | 2024-08-14 16:18:45 +0200 |
|---|---|---|
| committer | Morten Sørvig <morten.sorvig@qt.io> | 2024-08-15 14:09:16 +0200 |
| commit | 48beca4e7635cf2031c6707042d623c4daf44778 (patch) | |
| tree | 29ffada5cc2ce5dd126875ab3a041fda748bfa24 /src/plugins/platforms/wasm/qwasmcompositor.cpp | |
| parent | fd68f894b969b016201e032ba23dac431c19b90a (diff) | |
wasm: fix compile error due to EM_BOOL type change
emsdk 3.1.62 changes the EM_BOOL type from int to bool. We were
using int in two places in the wasm platform plugin.
Use EM_BOOL instead to stay compatible with emsdk editions earlier
and and later than 3.1.62
Pick-to: 6.8 6.7
Change-Id: I837e76f869225859643dd5a98a28a1eefb5f14a4
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmcompositor.cpp')
| -rw-r--r-- | src/plugins/platforms/wasm/qwasmcompositor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/wasm/qwasmcompositor.cpp b/src/plugins/platforms/wasm/qwasmcompositor.cpp index c534cce9ef5..dfac0e0b88e 100644 --- a/src/plugins/platforms/wasm/qwasmcompositor.cpp +++ b/src/plugins/platforms/wasm/qwasmcompositor.cpp @@ -86,7 +86,7 @@ void QWasmCompositor::requestUpdate() if (m_requestUpdateHoldEnabled) return; - static auto frame = [](double frameTime, void *context) -> int { + static auto frame = [](double frameTime, void *context) -> EM_BOOL { Q_UNUSED(frameTime); QWasmCompositor *compositor = reinterpret_cast<QWasmCompositor *>(context); @@ -94,7 +94,7 @@ void QWasmCompositor::requestUpdate() compositor->m_requestAnimationFrameId = -1; compositor->deliverUpdateRequests(); - return 0; + return EM_FALSE; }; m_requestAnimationFrameId = emscripten_request_animation_frame(frame, this); } |
