Fix incorrect fixed usage, remove api9 safety code from UiBuilder (#1893)

* fix incorrect fixed usage

* UiBuilder: remove leftover api9 safety code
This commit is contained in:
srkizer 2024-07-04 19:02:37 +09:00 committed by GitHub
parent 2272848cd3
commit 336d85363e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View file

@ -247,13 +247,15 @@ internal sealed partial class 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();
}
@ -264,7 +266,7 @@ internal sealed partial class TextureManager
null,
(uint)CLSCTX.CLSCTX_INPROC_SERVER,
piidWicImagingFactory,
(void**)this.wicFactory.GetAddressOf()).ThrowOnError();
(void**)ppWicFactory).ThrowOnError();
}
}
}

View file

@ -694,10 +694,6 @@ public sealed class UiBuilder : IDisposable, IUiBuilder
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)
{