Skip to content

Commit

Permalink
Merge pull request #39 from Shimrockx/master
Browse files Browse the repository at this point in the history
Replace deprecated browser interaction code : Change dynCall to makeD…
  • Loading branch information
psygames authored Dec 24, 2024
2 parents 164af61 + 00d3a96 commit 5f7a599
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Assets/UnityWebSocket/Plugins/WebGL/WebSocket.jslib
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ var WebSocketLibrary =

instance.ws.onopen = function()
{
Module.dynCall_vi(webSocketManager.onOpen, instanceId);
{{{ makeDynCall('vi', 'webSocketManager.onOpen') }}}(instanceId);
};

instance.ws.onmessage = function(ev)
Expand All @@ -166,7 +166,7 @@ var WebSocketLibrary =
writeArrayToMemory(array, buffer);
try
{
Module.dynCall_viii(webSocketManager.onMessage, instanceId, buffer, array.length);
{{{ makeDynCall('viii', 'webSocketManager.onMessage') }}}(instanceId, buffer, array.length);
}
finally
{
Expand All @@ -180,7 +180,7 @@ var WebSocketLibrary =
stringToUTF8(ev.data, buffer, length);
try
{
Module.dynCall_vii(webSocketManager.onMessageStr, instanceId, buffer);
{{{ makeDynCall('vii', 'webSocketManager.onMessageStr') }}}(instanceId, buffer);
}
finally
{
Expand All @@ -197,7 +197,7 @@ var WebSocketLibrary =
writeArrayToMemory(array, buffer);
try
{
Module.dynCall_viii(webSocketManager.onMessage, instanceId, buffer, array.length);
{{{ makeDynCall('viii', 'webSocketManager.onMessage') }}}(instanceId, buffer, array.length);
}
finally
{
Expand All @@ -221,7 +221,7 @@ var WebSocketLibrary =
stringToUTF8(msg, buffer, length);
try
{
Module.dynCall_vii(webSocketManager.onError, instanceId, buffer);
{{{ makeDynCall('vii', 'webSocketManager.onError') }}}(instanceId, buffer);
}
finally
{
Expand All @@ -237,7 +237,7 @@ var WebSocketLibrary =
stringToUTF8(msg, buffer, length);
try
{
Module.dynCall_viii(webSocketManager.onClose, instanceId, ev.code, buffer);
{{{ makeDynCall('viii', 'webSocketManager.onClose') }}}(instanceId, ev.code, buffer);
}
finally
{
Expand Down

0 comments on commit 5f7a599

Please sign in to comment.