diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-02 03:29:51 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-02 03:29:51 -0700 |
commit | e462a15fb8b1f5ff505153f1a3e1097a4fbf0e80 (patch) | |
tree | 4ec12048ddd90042556878a7ce0857904bdd651a /web/web_opts.c | |
parent | 22646d963e2b0c9b5ef629aa7704158026cfa6d1 (diff) | |
download | dartboat-e462a15fb8b1f5ff505153f1a3e1097a4fbf0e80.tar.gz dartboat-e462a15fb8b1f5ff505153f1a3e1097a4fbf0e80.tar.xz |
web: split opts and prompt handlers into separate files
Currently using a bunch of forward declarations in prompt.c that should
be cleaned up later.
Diffstat (limited to 'web/web_opts.c')
-rw-r--r-- | web/web_opts.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/web/web_opts.c b/web/web_opts.c new file mode 100644 index 0000000..1188232 --- /dev/null +++ b/web/web_opts.c @@ -0,0 +1,22 @@ +#include "web_opts.h" + +#include "comp.h" + +#include <math.h> + +#include <emscripten/emscripten.h> + +int delay_ms = 1000; + +EMSCRIPTEN_KEEPALIVE +void set_delay(int delay) +{ + delay_ms = delay; +} + +EMSCRIPTEN_KEEPALIVE +void set_stdev(float stdev) +{ + if (!isnan(stdev)) + horizontal_stdev = vertical_stdev = stdev; +} |