diff options
author | David Robillard <d@drobilla.net> | 2022-05-29 13:34:51 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-05-29 13:34:51 -0400 |
commit | 61716012041a8fab24921ee49e14d1f259c1dccb (patch) | |
tree | e2af89867c6dee8fe9f9164b1d5b494d3fabb30a | |
parent | 0d9ab7754d21c64d5ed04136ed938affefab82c7 (diff) | |
download | jalv-61716012041a8fab24921ee49e14d1f259c1dccb.tar.gz jalv-61716012041a8fab24921ee49e14d1f259c1dccb.tar.bz2 jalv-61716012041a8fab24921ee49e14d1f259c1dccb.zip |
Fix console interface build on Windows
-rw-r--r-- | src/jalv_console.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/jalv_console.c b/src/jalv_console.c index a9597e3..2ff2076 100644 --- a/src/jalv_console.c +++ b/src/jalv_console.c @@ -28,12 +28,17 @@ #include "zix/common.h" #include "zix/sem.h" +#ifdef _WIN32 +# include <synchapi.h> +#else +# include <unistd.h> +#endif + #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <unistd.h> static int print_usage(const char* name, bool error) @@ -268,7 +273,12 @@ jalv_run_custom_ui(Jalv* jalv) if (idle_iface->idle(suil_instance_get_handle(jalv->ui_instance))) { break; } + +# ifdef _WIN32 + Sleep(33); +# else usleep(33333); +# endif } show_iface->hide(suil_instance_get_handle(jalv->ui_instance)); |