diff options
author | cbdev <cb@cbcdn.com> | 2020-04-24 00:18:36 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2020-04-24 00:18:36 +0200 |
commit | ff785c5c5a300d01b404c48335de7f68ad8711a9 (patch) | |
tree | e72130c26062751788e731df47a03a1351f534c9 /backends/lua.c | |
parent | a8be76f20b3eaa20b53e1cda7686845a08cef32b (diff) | |
download | midimonster-ff785c5c5a300d01b404c48335de7f68ad8711a9.tar.gz midimonster-ff785c5c5a300d01b404c48335de7f68ad8711a9.tar.bz2 midimonster-ff785c5c5a300d01b404c48335de7f68ad8711a9.zip |
Update lua documentation, keep last value for handler
Diffstat (limited to 'backends/lua.c')
-rw-r--r-- | backends/lua.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/lua.c b/backends/lua.c index d7f2643..98ce369 100644 --- a/backends/lua.c +++ b/backends/lua.c @@ -517,7 +517,6 @@ static int lua_set(instance* inst, size_t num, channel** c, channel_value* v){ //handle all incoming events for(n = 0; n < num; n++){ ident = c[n]->ident; - data->channel[ident].in = v[n].normalised; //call lua channel handlers if present if(data->channel[ident].reference != LUA_NOREF){ //push the channel name @@ -532,6 +531,8 @@ static int lua_set(instance* inst, size_t num, channel** c, channel_value* v){ lua_pop(data->interpreter, 1); } } + //update the channel input value after the handler call, so we can use both values there + data->channel[ident].in = v[n].normalised; } //clear the channel name |