mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-28 09:27:10 +02:00
Allow access to code memory for exefs mods (#5518)
* Allow access to code memory for exefs mods * Add ASLR workaround for Skyline * Hardcode allowCodeMemoryForJit to true
This commit is contained in:
parent
773e239db7
commit
5e9678c8fa
5 changed files with 63 additions and 17 deletions
|
@ -27,6 +27,26 @@ namespace ARMeilleure.Translation.PTC
|
|||
return dictionary;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Dictionary<TKey, TValue> DeserializeAndUpdateDictionary<TKey, TValue>(Stream stream, Func<Stream, TValue> valueFunc, Func<TKey, TValue, (TKey, TValue)> updateFunc) where TKey : struct
|
||||
{
|
||||
Dictionary<TKey, TValue> dictionary = new();
|
||||
|
||||
int count = DeserializeStructure<int>(stream);
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
TKey key = DeserializeStructure<TKey>(stream);
|
||||
TValue value = valueFunc(stream);
|
||||
|
||||
(key, value) = updateFunc(key, value);
|
||||
|
||||
dictionary.Add(key, value);
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static List<T> DeserializeList<T>(Stream stream) where T : struct
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue