Skip to content

Commit

Permalink
Fix incorrect fixed usage, remove api9 safety code from UiBuilder (go…
Browse files Browse the repository at this point in the history
…atcorp#1893)

* fix incorrect fixed usage

* UiBuilder: remove leftover api9 safety code
  • Loading branch information
Soreepeong committed Jul 4, 2024
1 parent 2272848 commit 336d853
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Dalamud/Interface/Textures/Internal/TextureManager.Wic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,15 @@ public WicManager(TextureManager textureManager)
fixed (Guid* piidWicImagingFactory = &IID.IID_IWICImagingFactory)
fixed (Guid* pclsidWicImagingFactory2 = &CLSID.CLSID_WICImagingFactory2)
fixed (Guid* piidWicImagingFactory2 = &IID.IID_IWICImagingFactory2)
fixed (IWICImagingFactory** ppWicFactory = &this.wicFactory.GetPinnableReference())
fixed (IWICImagingFactory2** ppWicFactory2 = &this.wicFactory2.GetPinnableReference())
{
if (CoCreateInstance(
pclsidWicImagingFactory2,
null,
(uint)CLSCTX.CLSCTX_INPROC_SERVER,
piidWicImagingFactory2,
(void**)this.wicFactory2.GetAddressOf()).SUCCEEDED)
(void**)ppWicFactory2).SUCCEEDED)
{
this.wicFactory2.As(ref this.wicFactory).ThrowOnError();
}
Expand All @@ -264,7 +266,7 @@ public WicManager(TextureManager textureManager)
null,
(uint)CLSCTX.CLSCTX_INPROC_SERVER,
piidWicImagingFactory,
(void**)this.wicFactory.GetAddressOf()).ThrowOnError();
(void**)ppWicFactory).ThrowOnError();
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions Dalamud/Interface/UiBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,6 @@ private void OnDraw()
this.ShowUi?.InvokeSafely();
}

// just in case, if something goes wrong, prevent drawing; otherwise it probably will crash.
if (!this.FontAtlas.BuildTask.IsCompletedSuccessfully)
return;

ImGui.PushID(this.namespaceName);
if (DoStats)
{
Expand Down

0 comments on commit 336d853

Please sign in to comment.