Scripting: Return proper callback ID from socket.add

This commit is contained in:
Vicki Pfau 2023-03-19 04:59:00 -07:00
parent 7517cce0af
commit 8344efdccd
2 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ Other fixes:
- Qt: Fix checked state of mute menu option at load (fixes mgba.io/i/2701) - Qt: Fix checked state of mute menu option at load (fixes mgba.io/i/2701)
- Scripting: Fix receiving packets for client sockets - Scripting: Fix receiving packets for client sockets
- Scripting: Fix empty receive calls returning unknown error on Windows - Scripting: Fix empty receive calls returning unknown error on Windows
- Scripting: Return proper callback ID from socket.add
Misc: Misc:
- Qt: Include wayland QPA in AppImage (fixes mgba.io/i/2796) - Qt: Include wayland QPA in AppImage (fixes mgba.io/i/2796)
- Qt: Stop eating boolean action key events (fixes mgba.io/i/2636) - Qt: Stop eating boolean action key events (fixes mgba.io/i/2636)

View File

@ -98,7 +98,7 @@ static const char* _socketLuaSource =
" local cbid = self._nextCallback\n" " local cbid = self._nextCallback\n"
" self._nextCallback = cbid + 1\n" " self._nextCallback = cbid + 1\n"
" self._callbacks[event][cbid] = callback\n" " self._callbacks[event][cbid] = callback\n"
" return id\n" " return cbid\n"
" end,\n" " end,\n"
" remove = function(self, cbid)\n" " remove = function(self, cbid)\n"
" for _, group in pairs(self._callbacks) do\n" " for _, group in pairs(self._callbacks) do\n"