提交 9b10802d 编写于 作者: E Elie Bariche

perf: Add DispatchMessage export

上级 62bb542a
......@@ -27,8 +27,12 @@
public static startMessageListener(managedId: string) {
if (!MidiInPort.dispatchMessage) {
MidiInPort.dispatchMessage = (<any>Module).mono_bind_static_method(
"[Uno] Windows.Devices.Midi.MidiInPort:DispatchMessage");
if ((<any>globalThis).DotnetExports !== undefined) {
MidiInPort.dispatchMessage = (<any>globalThis).DotnetExports.Uno.Windows.Devices.Midi.MidiInPort.DispatchMessage;
} else {
MidiInPort.dispatchMessage = (<any>Module).mono_bind_static_method(
"[Uno] Windows.Devices.Midi.MidiInPort:DispatchMessage");
}
}
const instance = MidiInPort.instanceMap[managedId];
......
......@@ -12,6 +12,8 @@ using Uno.Devices.Midi.Internal;
using Uno.Foundation;
#if NET7_0_OR_GREATER
using System.Runtime.InteropServices.JavaScript;
using NativeMethods = __Windows.Devices.Midi.MidiInPort.NativeMethods;
#endif
......@@ -58,6 +60,9 @@ namespace Windows.Devices.Midi
#endif
}
#if NET7_0_OR_GREATER
[JSExport]
#endif
public static int DispatchMessage(string managedId, string serializedMessage, double timestamp)
{
#if DEBUG
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册