Merge pull request #994 from rootdarkarchon/master

This commit is contained in:
goat 2022-09-03 23:46:44 +02:00 committed by GitHub
commit 546039fa11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 165 additions and 99 deletions

View file

@ -773,7 +773,7 @@ namespace Dalamud.Interface.Internal
var customFontFirstConfigIndex = ioFonts.ConfigData.Size;
Log.Verbose("[FONT] Invoke OnBuildFonts");
this.BuildFonts?.Invoke();
this.BuildFonts?.InvokeSafely();
Log.Verbose("[FONT] OnBuildFonts OK!");
for (int i = customFontFirstConfigIndex, i_ = ioFonts.ConfigData.Size; i < i_; i++)
@ -881,7 +881,7 @@ namespace Dalamud.Interface.Internal
}
Log.Verbose("[FONT] Invoke OnAfterBuildFonts");
this.AfterBuildFonts?.Invoke();
this.AfterBuildFonts?.InvokeSafely();
Log.Verbose("[FONT] OnAfterBuildFonts OK!");
if (ioFonts.Fonts[0].NativePtr != DefaultFont.NativePtr)
@ -978,7 +978,7 @@ namespace Dalamud.Interface.Internal
Log.Verbose($"Calling resizebuffers swap@{swapChain.ToInt64():X}{bufferCount} {width} {height} {newFormat} {swapChainFlags}");
#endif
this.ResizeBuffers?.Invoke();
this.ResizeBuffers?.InvokeSafely();
// We have to ensure we're working with the main swapchain,
// as viewports might be resizing as well

View file

@ -10,6 +10,7 @@ using Dalamud.Interface.GameFonts;
using Dalamud.Interface.Internal;
using Dalamud.Interface.Internal.ManagedAsserts;
using Dalamud.Interface.Internal.Notifications;
using Dalamud.Utility;
using ImGuiNET;
using ImGuiScene;
using Serilog;
@ -392,7 +393,7 @@ namespace Dalamud.Interface
/// </summary>
internal void OpenConfig()
{
this.OpenConfigUi?.Invoke();
this.OpenConfigUi?.InvokeSafely();
}
/// <summary>
@ -400,7 +401,7 @@ namespace Dalamud.Interface
/// </summary>
internal void NotifyHideUi()
{
this.HideUi?.Invoke();
this.HideUi?.InvokeSafely();
}
/// <summary>
@ -408,7 +409,7 @@ namespace Dalamud.Interface
/// </summary>
internal void NotifyShowUi()
{
this.ShowUi?.Invoke();
this.ShowUi?.InvokeSafely();
}
private void OnDraw()
@ -428,7 +429,7 @@ namespace Dalamud.Interface
if (!this.lastFrameUiHideState)
{
this.lastFrameUiHideState = true;
this.HideUi?.Invoke();
this.HideUi?.InvokeSafely();
}
return;
@ -437,7 +438,7 @@ namespace Dalamud.Interface
if (this.lastFrameUiHideState)
{
this.lastFrameUiHideState = false;
this.ShowUi?.Invoke();
this.ShowUi?.InvokeSafely();
}
if (!this.interfaceManager.FontsReady)
@ -470,7 +471,7 @@ namespace Dalamud.Interface
try
{
this.Draw?.Invoke();
this.Draw?.InvokeSafely();
}
catch (Exception ex)
{
@ -503,17 +504,17 @@ namespace Dalamud.Interface
private void OnBuildFonts()
{
this.BuildFonts?.Invoke();
this.BuildFonts?.InvokeSafely();
}
private void OnAfterBuildFonts()
{
this.AfterBuildFonts?.Invoke();
this.AfterBuildFonts?.InvokeSafely();
}
private void OnResizeBuffers()
{
this.ResizeBuffers?.Invoke();
this.ResizeBuffers?.InvokeSafely();
}
}
}