mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-19 23:24:18 +01:00
feat: expose Device and WindowHandle on UiBuilder
This commit is contained in:
parent
3fe6e45b68
commit
0cea6ffe10
4 changed files with 21 additions and 3 deletions
|
|
@ -11,6 +11,7 @@ using EasyHook;
|
|||
using ImGuiNET;
|
||||
using ImGuiScene;
|
||||
using Serilog;
|
||||
using SharpDX.Direct3D11;
|
||||
|
||||
// general dev notes, here because it's easiest
|
||||
/*
|
||||
|
|
@ -46,6 +47,9 @@ namespace Dalamud.Interface
|
|||
private Dalamud dalamud;
|
||||
private RawDX11Scene scene;
|
||||
|
||||
public Device Device => this.scene.Device;
|
||||
public IntPtr WindowHandlePtr => this.scene.WindowHandle;
|
||||
|
||||
private delegate void InstallRTSSHook();
|
||||
private string rtssPath;
|
||||
|
||||
|
|
@ -218,9 +222,9 @@ namespace Dalamud.Interface
|
|||
|
||||
private IntPtr PresentDetour(IntPtr swapChain, uint syncInterval, uint presentFlags)
|
||||
{
|
||||
if (this.scene == null)
|
||||
{
|
||||
if (this.scene == null) {
|
||||
this.scene = new RawDX11Scene(swapChain);
|
||||
|
||||
this.scene.ImGuiIniPath = Path.Combine(Path.GetDirectoryName(this.dalamud.StartInfo.ConfigurationPath), "dalamudUI.ini");
|
||||
this.scene.OnBuildUI += Display;
|
||||
this.scene.OnNewInputFrame += OnNewInputFrame;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue