(string arch)
| 127 | [DllImport("dl", CharSet = CharSet.Ansi)] |
| 128 | static extern IntPtr dlopen(string fileName, int flags); |
| 129 | static bool LoadUnix1(string arch) |
| 130 | { |
| 131 | const int RTLD_NOW = 2; |
| 132 | if (dlopen($"./runtimes/linux-{arch}/native/libStereoKitC.so", RTLD_NOW) != IntPtr.Zero) return true; |
| 133 | if (dlopen($"{AppDomain.CurrentDomain.BaseDirectory}/runtimes/linux-{arch}/native/libStereoKitC.so", RTLD_NOW) != IntPtr.Zero) return true; |
| 134 | if (dlopen("libStereoKitC.so", RTLD_NOW) != IntPtr.Zero) return true; |
| 135 | return false; |
| 136 | } |
| 137 | |
| 138 | // libdl.so.2 is apparently preferred when present? |
| 139 | [DllImport("libdl.so.2", CharSet = CharSet.Ansi, EntryPoint = "dlopen")] |
nothing calls this directly
no outgoing calls
no test coverage detected