From d4fd8411c44523cdd58e62b8d113599526dd441c Mon Sep 17 00:00:00 2001 From: David Reid Date: Sun, 6 Aug 2023 15:39:54 +1000 Subject: [PATCH] Update Emscripten test. --- tests/test_emscripten/ma_test_emscripten.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_emscripten/ma_test_emscripten.c b/tests/test_emscripten/ma_test_emscripten.c index 549cef43..9cdd0c64 100644 --- a/tests/test_emscripten/ma_test_emscripten.c +++ b/tests/test_emscripten/ma_test_emscripten.c @@ -104,6 +104,12 @@ static EM_BOOL on_canvas_click(int eventType, const EmscriptenMouseEvent* pMouse } isRunning = MA_TRUE; + } else { + if (ma_device_get_state(&device) == ma_device_state_started) { + ma_device_stop(&device); + } else { + ma_device_start(&device); + } } (void)eventType;