FNA-XNA / FNA

FNA - Accuracy-focused XNA4 reimplementation for open platforms
https://fna-xna.github.io/
2.65k stars 272 forks source link

Fix iOS/tvOS support in FNADllMap #464

Closed TheSpydog closed 11 months ago

TheSpydog commented 11 months ago

Mono's dllmap considers "osx" to be the platform name for macOS, iOS, and tvOS. This PR brings FNADllMap in line with that convention.

kiddkaffeine commented 11 months ago

Unfortunately, .net 7/8 appears to be stripping symbols even when you ask it not to. The options to preserve individual symbols does still work, although there are quite a lot of them required for this and that list can change between FNA versions.

Anyway, on the FNA end, there is still one additional change required. In MapAndLoad before the call to NativeLibrary.Load, we need to add the following:

`#if NET7_0_OR_GREATER if (mappedName == "__Internal") { return NativeLibrary.GetMainProgramHandle(); }

endif`