aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-05-03 19:23:45 +0200
committercbdev <cb@cbcdn.com>2020-05-03 19:23:45 +0200
commitc2248f6bee6b3eef770b557d9be7659dae586222 (patch)
tree653eff4d8d0cc4cbd270e7ca07be88c4da8d71fc
parentf9886f3b06ce8e32aea893208646053f93a00a6c (diff)
downloadmidimonster-c2248f6bee6b3eef770b557d9be7659dae586222.tar.gz
midimonster-c2248f6bee6b3eef770b557d9be7659dae586222.tar.bz2
midimonster-c2248f6bee6b3eef770b557d9be7659dae586222.zip
Strip Windows binaries, update semantics for _interval callback
-rw-r--r--.travis-ci.sh2
-rw-r--r--backend.c4
-rw-r--r--midimonster.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/.travis-ci.sh b/.travis-ci.sh
index 8f6a5ca..8d5d42d 100644
--- a/.travis-ci.sh
+++ b/.travis-ci.sh
@@ -78,6 +78,8 @@ elif [ "$TASK" = "windows" ]; then
mkdir ./deployment
mkdir ./deployment/backends
mkdir ./deployment/docs
+ # Strip the Windows binaries as they become huge quickly
+ strip midimonster.exe backends/*.dll
cp ./midimonster.exe ./deployment/
cp ./backends/*.dll ./deployment/backends/
cp ./backends/*.dll.disabled ./deployment/backends/
diff --git a/backend.c b/backend.c
index 003980f..0fb6679 100644
--- a/backend.c
+++ b/backend.c
@@ -234,12 +234,12 @@ struct timeval backend_timeout(){
//only call interval if backend has instances
if(registry.instances[u] && registry.backends[u].interval){
res = registry.backends[u].interval();
- if((res / 1000) < secs){
+ if(res && (res / 1000) < secs){
DBGPF("Updating interval to %" PRIu32 " msecs by request from %s", res, registry.backends[u].name);
secs = res / 1000;
msecs = res % 1000;
}
- else if(res / 1000 == secs && (res % 1000) < msecs){
+ else if(res && res / 1000 == secs && (res % 1000) < msecs){
DBGPF("Updating interval to %" PRIu32 " msecs by request from %s", res, registry.backends[u].name);
msecs = res % 1000;
}
diff --git a/midimonster.h b/midimonster.h
index a5de60e..9552b7e 100644
--- a/midimonster.h
+++ b/midimonster.h
@@ -129,6 +129,8 @@ struct _managed_fd;
* * (optional) mmbackend_interval
* Return the maximum sleep interval for this backend in milliseconds.
* If not implemented, a maximum interval of one second is used.
+ * Returning 0 signals that the backend does not have a minimum
+ * interval.
* * mmbackend_shutdown
* Clean up all allocations, finalize all hardware connections. All registered
* backends receive the shutdown call, regardless of whether they have been