mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 14:23:40 +01:00
fix: use ImGuiHelpers.MainViewport instead of ImGui builtin for W2S/S2W
This commit is contained in:
parent
1677cb084b
commit
633fe68046
1 changed files with 4 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using System.Runtime.InteropServices;
|
||||
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
||||
using Dalamud.Hooking;
|
||||
using Dalamud.Interface;
|
||||
using ImGuiNET;
|
||||
using Serilog;
|
||||
using SharpDX;
|
||||
|
|
@ -290,7 +291,7 @@ namespace Dalamud.Game.Internal.Gui {
|
|||
// Read current ViewProjectionMatrix plus game window size
|
||||
var viewProjectionMatrix = new Matrix();
|
||||
float width, height;
|
||||
var windowPos = ImGui.GetMainViewport().Pos;
|
||||
var windowPos = ImGuiHelpers.MainViewport.Pos;
|
||||
|
||||
unsafe {
|
||||
var rawMatrix = (float*) (matrixSingleton + 0x1b4).ToPointer();
|
||||
|
|
@ -325,8 +326,8 @@ namespace Dalamud.Game.Internal.Gui {
|
|||
{
|
||||
// The game is only visible in the main viewport, so if the cursor is outside
|
||||
// of the game window, do not bother calculating anything
|
||||
var windowPos = ImGui.GetMainViewport().Pos;
|
||||
var windowSize = ImGui.GetMainViewport().Size;
|
||||
var windowPos = ImGuiHelpers.MainViewport.Pos;
|
||||
var windowSize = ImGuiHelpers.MainViewport.Size;
|
||||
|
||||
if (screenPos.X < windowPos.X || screenPos.X > windowPos.X + windowSize.X ||
|
||||
screenPos.Y < windowPos.Y || screenPos.Y > windowPos.Y + windowSize.Y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue