diff options
author | Arturs Artamonovs <arturs.artamonovs@protonmail.com> | 2021-07-27 07:11:58 +0100 |
---|---|---|
committer | Arturs Artamonovs <arturs.artamonovs@protonmail.com> | 2021-07-27 07:11:58 +0100 |
commit | 2511c4fa6b2f5c4fae85a7b2e8ff12001318d9cd (patch) | |
tree | b63ecfb26bd5ac434763bc3339b24444f27f57fa | |
parent | ef53f705cf5708875a43fc314d741964ffa71637 (diff) | |
download | WasmAudio-2511c4fa6b2f5c4fae85a7b2e8ff12001318d9cd.tar.gz WasmAudio-2511c4fa6b2f5c4fae85a7b2e8ff12001318d9cd.zip |
Disable mouse events
-rw-r--r-- | Build/index.html | 7 | ||||
-rw-r--r-- | WasmAudio/main.c | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/Build/index.html b/Build/index.html index 4c371ec..02c0d3f 100644 --- a/Build/index.html +++ b/Build/index.html @@ -33,7 +33,7 @@ <button class="setNumberTaps" type="button">Set Taps</button> <textarea class="outSetNumberTaps"></textarea> - <button class="recalculateFir" type="button">Calc</button> + <button class="recalculateFir" id="recalculateFir" type="button">Calc</button> <textarea class="outCoeficients">1</textarea> @@ -59,6 +59,11 @@ outCoeficients.value = 2; }) + document.querySelector("#recalculateFir").onclick = function() { + console.log("Oh noe"); + outCoeficients.value = 2; + } + </script> diff --git a/WasmAudio/main.c b/WasmAudio/main.c index 9ddf5ba..4987fff 100644 --- a/WasmAudio/main.c +++ b/WasmAudio/main.c @@ -524,6 +524,11 @@ int main(int argc, const char * argv[]) { fprintf(stderr, "EXIT:Unable to init SDL: %s\n", SDL_GetError()); exit(1); } + SDL_EventState(SDL_MOUSEBUTTONUP, SDL_IGNORE); + SDL_EventState(SDL_MOUSEBUTTONDOWN, SDL_IGNORE); + SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE); + SDL_EventState(SDL_MOUSEWHEEL, SDL_IGNORE); + atexit(SDL_Quit); |