mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
Make IFontHandle.Push return IDisposable, and add IFontHandle.Pop
This commit is contained in:
parent
a409ea60d6
commit
29b3e0aa97
9 changed files with 185 additions and 47 deletions
|
|
@ -230,6 +230,11 @@ internal class InterfaceManager : IDisposable, IServiceType
|
|||
/// </summary>
|
||||
public Task FontBuildTask => WhenFontsReady().dalamudAtlas!.BuildTask;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of calls to <see cref="PresentDetour"/> so far.
|
||||
/// </summary>
|
||||
public long CumulativePresentCalls { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Dispose of managed and unmanaged resources.
|
||||
/// </summary>
|
||||
|
|
@ -647,6 +652,8 @@ internal class InterfaceManager : IDisposable, IServiceType
|
|||
*/
|
||||
private IntPtr PresentDetour(IntPtr swapChain, uint syncInterval, uint presentFlags)
|
||||
{
|
||||
this.CumulativePresentCalls++;
|
||||
|
||||
Debug.Assert(this.presentHook is not null, "How did PresentDetour get called when presentHook is null?");
|
||||
Debug.Assert(this.dalamudAtlas is not null, "dalamudAtlas should have been set already");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue