aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv_console.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-05-29 13:34:51 -0400
committerDavid Robillard <d@drobilla.net>2022-05-29 13:34:51 -0400
commit61716012041a8fab24921ee49e14d1f259c1dccb (patch)
treee2af89867c6dee8fe9f9164b1d5b494d3fabb30a /src/jalv_console.c
parent0d9ab7754d21c64d5ed04136ed938affefab82c7 (diff)
downloadjalv-61716012041a8fab24921ee49e14d1f259c1dccb.tar.gz
jalv-61716012041a8fab24921ee49e14d1f259c1dccb.tar.bz2
jalv-61716012041a8fab24921ee49e14d1f259c1dccb.zip
Fix console interface build on Windows
Diffstat (limited to 'src/jalv_console.c')
-rw-r--r--src/jalv_console.c12
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));