diff options
author | cbdev <cb@cbcdn.com> | 2020-03-17 01:09:52 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2020-03-17 01:09:52 +0100 |
commit | 636a9592eab1963c2b1a77bd59eaff317fa55b75 (patch) | |
tree | 2ae5844e2f8bbb4e9554157e65ddad93de867896 | |
parent | 846a49199ba011a00e4814bacac524a6fe9b299a (diff) | |
download | midimonster-636a9592eab1963c2b1a77bd59eaff317fa55b75.tar.gz midimonster-636a9592eab1963c2b1a77bd59eaff317fa55b75.tar.bz2 midimonster-636a9592eab1963c2b1a77bd59eaff317fa55b75.zip |
Fix registry apply bug, fix openpixelcontrol broadcast
-rw-r--r-- | backend.c | 3 | ||||
-rw-r--r-- | backends/openpixelcontrol.c | 10 | ||||
-rw-r--r-- | midimonster.c | 2 |
3 files changed, 7 insertions, 8 deletions
@@ -55,7 +55,7 @@ int backends_notify(size_t nev, channel** c, channel_value* v){ channel_value xval; channel* xchnl = NULL; - for(u = 0; u < nev && !rv; u++){ + for(u = 0; u < nev && !rv; u = n){ //sort for this instance n = u + 1; for(p = u + 1; p < nev; p++){ @@ -75,7 +75,6 @@ int backends_notify(size_t nev, channel** c, channel_value* v){ //TODO eliminate duplicates DBGPF("Calling handler for instance %s with %" PRIsize_t " events\n", c[u]->instance->name, n - u); rv |= c[u]->instance->backend->handle(c[u]->instance, n - u, c + u, v + u); - u = n; } return 0; diff --git a/backends/openpixelcontrol.c b/backends/openpixelcontrol.c index 168e077..2a5e01f 100644 --- a/backends/openpixelcontrol.c +++ b/backends/openpixelcontrol.c @@ -495,11 +495,11 @@ static ssize_t openpixel_client_headerdata(instance* inst, openpixel_client* cli } else{ client->buffer = openpixel_buffer_find(data, client->hdr.strip, 1); - } - //if no buffer or mode mismatch, ignore data - if(client->buffer < 0 - || data->mode != client->hdr.mode){ - client->buffer = -2; //mark for ignore + //if no buffer or mode mismatch, ignore data + if(client->buffer < 0 + || data->mode != client->hdr.mode){ + client->buffer = -2; //mark for ignore + } } client->left = be16toh(client->hdr.length); client->offset = 0; diff --git a/midimonster.c b/midimonster.c index afb6a2b..1691671 100644 --- a/midimonster.c +++ b/midimonster.c @@ -409,7 +409,7 @@ static int core_loop(){ #ifndef _WIN32 fprintf(stderr, "select failed: %s\n", strerror(errno)); #else - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, WSAGetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &error_message, 0, NULL); fprintf(stderr, "select failed: %s\n", error_message); LocalFree(error_message); |