mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-25 14:11:48 +01:00
Merge branch 'master' into Plugin-Installer
This commit is contained in:
commit
f28d40f6ae
3 changed files with 18 additions and 16 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<PropertyGroup Label="Feature">
|
<PropertyGroup Label="Feature">
|
||||||
<Description>XIV Launcher addon framework</Description>
|
<Description>XIV Launcher addon framework</Description>
|
||||||
<DalamudVersion>14.0.2.1</DalamudVersion>
|
<DalamudVersion>14.0.2.2</DalamudVersion>
|
||||||
<AssemblyVersion>$(DalamudVersion)</AssemblyVersion>
|
<AssemblyVersion>$(DalamudVersion)</AssemblyVersion>
|
||||||
<Version>$(DalamudVersion)</Version>
|
<Version>$(DalamudVersion)</Version>
|
||||||
<FileVersion>$(DalamudVersion)</FileVersion>
|
<FileVersion>$(DalamudVersion)</FileVersion>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
using Dalamud.Configuration.Internal;
|
||||||
using Dalamud.Game;
|
using Dalamud.Game;
|
||||||
using Dalamud.Logging.Internal;
|
using Dalamud.Logging.Internal;
|
||||||
|
|
||||||
|
|
@ -65,6 +66,13 @@ internal static class HookVerifier
|
||||||
/// <exception cref="HookVerificationException">Exception thrown when we think the hook is not correctly declared.</exception>
|
/// <exception cref="HookVerificationException">Exception thrown when we think the hook is not correctly declared.</exception>
|
||||||
public static void Verify<T>(IntPtr address) where T : Delegate
|
public static void Verify<T>(IntPtr address) where T : Delegate
|
||||||
{
|
{
|
||||||
|
// API15 TODO: Always throw
|
||||||
|
var config = Service<DalamudConfiguration>.GetNullable();
|
||||||
|
if (config != null && config.DevPluginLoadLocations.Count == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var entry = ToVerify.FirstOrDefault(x => x.Address == address);
|
var entry = ToVerify.FirstOrDefault(x => x.Address == address);
|
||||||
|
|
||||||
// Nothing to verify for this hook?
|
// Nothing to verify for this hook?
|
||||||
|
|
|
||||||
|
|
@ -297,17 +297,11 @@ internal unsafe partial class ImageNodeTree : ResNodeTree
|
||||||
}
|
}
|
||||||
|
|
||||||
this.TexType = asset->AtkTexture.TextureType;
|
this.TexType = asset->AtkTexture.TextureType;
|
||||||
|
this.Texture = asset->AtkTexture.IsTextureReady() ? asset->AtkTexture.GetKernelTexture() : null;
|
||||||
|
|
||||||
if (this.TexType == Resource)
|
if (this.TexType == Resource && asset->AtkTexture.Resource != null && asset->AtkTexture.Resource->TexFileResourceHandle != null)
|
||||||
{
|
{
|
||||||
var resource = asset->AtkTexture.Resource;
|
this.Path = asset->AtkTexture.Resource->TexFileResourceHandle->ResourceHandle.FileName.ToString();
|
||||||
this.Texture = resource->KernelTextureObject;
|
|
||||||
this.Path = Marshal.PtrToStringAnsi(new(resource->TexFileResourceHandle->ResourceHandle.FileName.BufferPtr));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.Texture = this.TexType == KernelTexture ? asset->AtkTexture.KernelTexture : null;
|
|
||||||
this.Path = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.HiRes = this.Path?.Contains("_hr1") ?? false;
|
this.HiRes = this.Path?.Contains("_hr1") ?? false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue