internal static IntPtr ReadToPointer(string name, out IntPtr size) { string safeName = MonoGame.Utilities.FileHelpers.NormalizeFilePathSeparators(name); #if CASE_SENSITIVITY_HACK if (Path.IsPathRooted(safeName)) { safeName = GetCaseName(safeName); } safeName = GetCaseName(Path.Combine(TitleLocation.Path, safeName)); #endif string realName; if (Path.IsPathRooted(safeName)) { realName = safeName; } else { realName = Path.Combine(TitleLocation.Path, safeName); } if (!File.Exists(realName)) { throw new FileNotFoundException(realName); } return(FNAPlatform.ReadFileToPointer(realName, out size)); }
internal static IntPtr ReadToPointer(string name, out IntPtr size) { string safeName = MonoGame.Utilities.FileHelpers.NormalizeFilePathSeparators(name); #if CASE_SENSITIVITY_HACK if (Path.IsPathRooted(safeName)) { safeName = GetCaseName(safeName); } safeName = GetCaseName(Path.Combine(TitleLocation.Path, safeName)); #endif if (Path.IsPathRooted(safeName)) { return(FNAPlatform.ReadFileToPointer(safeName, out size)); } return(FNAPlatform.ReadFileToPointer(Path.Combine(TitleLocation.Path, safeName), out size)); }