Files
Plugin/h -f
T

1.5 KiB

diff --git a/Source/SenseGlove/Private/SenseGlove/SGHeadMountDisplay.cpp b/Source/SenseGlove/Private/SenseGlove/SGHeadMountDisplay.cpp
index bc65ea56..1bda9233 100644
--- a/Source/SenseGlove/Private/SenseGlove/SGHeadMountDisplay.cpp
+++ b/Source/SenseGlove/Private/SenseGlove/SGHeadMountDisplay.cpp
@@ -38,6 +38,7 @@
#include "Engine/Engine.h"
#include "IHeadMountedDisplay.h"
#include "IXRTrackingSystem.h"
+#include "SGLog/SGLog.h"
 
FName FSGHeadMountDisplay::GetDeviceName()
{
@@ -52,6 +53,17 @@ FName FSGHeadMountDisplay::GetDeviceName()
 
ESGHeadMountDisplayDevice FSGHeadMountDisplay::GetDeviceType()
{
+ if (GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed())
+ {
+ IHeadMountedDisplay::MonitorInfo HmdMonitorInfo;
+ IHeadMountedDisplay* Device{GEngine->XRSystem->GetHMDDevice()};
+ Device->GetHMDMonitorInfo(HmdMonitorInfo);
+ const int32 ResX = HmdMonitorInfo.ResolutionX;
+ const int32 ResY = HmdMonitorInfo.ResolutionY;
+ SGLOG(HmdMonitorInfo.MonitorName, ResX, ResY, HmdMonitorInfo.DesktopX, HmdMonitorInfo.DesktopY,
+ HmdMonitorInfo.WindowSizeX, HmdMonitorInfo.WindowSizeY);
+ }
+
if (IsMetaQuest2())
{
return ESGHeadMountDisplayDevice::MetaQuest2;