summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/saw/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/saw/main.c b/source/saw/main.c
index a2ccbb5..e100e61 100644
--- a/source/saw/main.c
+++ b/source/saw/main.c
@@ -768,7 +768,10 @@ static void saw_ui_track(saw_track_t *track, i64 x0, i64 y0,
if (!saw_lbutton_down && track->value_input != TRACK_INPUT_NONE) {
track->value_input = TRACK_INPUT_NONE;
track->value_buffer = 0;
+
+#ifndef __EMSCRIPTEN__
sapp_lock_mouse(0);
+#endif
}
for (i32 input_index = TRACK_INPUT_INSTRUMENT;
@@ -793,7 +796,11 @@ static void saw_ui_track(saw_track_t *track, i64 x0, i64 y0,
if (saw_lbutton_click &&
track->value_input == TRACK_INPUT_NONE) {
+
+#ifndef __EMSCRIPTEN__
sapp_lock_mouse(1);
+#endif
+
track->value_input = input_index;
switch (input_index) {