Scripting: Return proper callback ID from socket.add

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

View File

@ -28,6 +28,7 @@ Other fixes:
- Qt: Fix OSD on modern macOS (fixes mgba.io/i/2736)
- Scripting: Fix receiving packets for client sockets
- Scripting: Fix empty receive calls returning unknown error on Windows
- Scripting: Return proper callback ID from socket.add
Misc:
- Core: Handle relative paths for saves, screenshots, etc consistently (fixes mgba.io/i/2826)
- GB Serialize: Add missing savestate support for MBC6 and NT (newer)

View File

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