Update Cryville.Input.

This commit is contained in:
2023-11-20 20:23:33 +08:00
parent 30e9f091d7
commit 4f12e4816f
8 changed files with 58 additions and 79 deletions

View File

@@ -1,19 +1,9 @@
using System.Runtime.InteropServices;
namespace Cryville.Input.Unity.Android {
struct ProxiedInputFrame {
public int hid;
public int id;
public int action;
public long time;
public float x;
public float y;
public float z;
public float w;
};
internal delegate void AndroidInputProxy_Callback(int id, int action, long time, float x, float y, float z, float w);
internal static class NativeMethods {
[DllImport("AndroidInputProxy")]
[PreserveSig]
public static extern int AndroidInputProxy_Poll(out ProxiedInputFrame frame);
public static extern void AndroidInputProxy_RegisterCallback(int hid, AndroidInputProxy_Callback cb);
}
}