diff --git a/Source/CAVEOverlay/Private/CAVEOverlayController.cpp b/Source/CAVEOverlay/Private/CAVEOverlayController.cpp index d15ec0f6d11f08e68a9b95abcbea94be4f47b7f6..6e2b756f70c07128b52cc46dae52c216da0ebb32 100644 --- a/Source/CAVEOverlay/Private/CAVEOverlayController.cpp +++ b/Source/CAVEOverlay/Private/CAVEOverlayController.cpp @@ -10,6 +10,7 @@ #include "Components/InputComponent.h" #include "Cluster/IDisplayClusterClusterManager.h" #include "IDisplayClusterGameManager.h" +#include "IDisplayClusterConfigManager.h" #include "UObject/ConstructorHelpers.h" #include <array> #include "Components/StaticMeshComponent.h" @@ -153,7 +154,7 @@ void ACAVEOverlayController::SetDoorMode(EDoor_Mode M) Door_Current_Opening_Width_Absolute = Wall_Distance * 2; if (Screen_Type == SCREEN_DOOR) Overlay->BlackBox->SetRenderScale(FVector2D(1, 1)); if (Screen_Type == SCREEN_DOOR_PARTIAL) Overlay->BlackBox->SetRenderScale(FVector2D(1, 1)); - if (Screen_Type == SCREEN_MASTER) Overlay->BlackBox->SetRenderScale(FVector2D(1, 1)); + if (Screen_Type == SCREEN_MASTER) Overlay->BlackBox->SetRenderScale(FVector2D(0, 1)); Overlay->BlackBox->SetVisibility(ESlateVisibility::Visible); break; case EDoor_Mode::DOOR_CLOSED: @@ -181,10 +182,12 @@ void ACAVEOverlayController::BeginPlay() Super::BeginPlay(); //Read situation - bHMD_Mode = GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed(); - bDisplay_Cluster_Mode = IDisplayCluster::Get().GetOperationMode() == EDisplayClusterOperationMode::Cluster; - - if (!bDisplay_Cluster_Mode) return; // Not our business + if (IDisplayCluster::Get().GetOperationMode() == EDisplayClusterOperationMode::Cluster) { + auto ClusterConfigCustom = IDisplayCluster::Get().GetConfigMgr()->GetConfigCustom(); + bCAVE_Mode = ClusterConfigCustom.Args.Contains("Hardware_Platform") && ClusterConfigCustom.Args.Find("Hardware_Platform")->Equals("aixcave", ESearchCase::IgnoreCase); + } + + if (!bCAVE_Mode) return; // Not our business //Input config InputComponent->BindAction("Action4", EInputEvent::IE_Pressed, this, &ACAVEOverlayController::CycleDoorType); @@ -253,7 +256,7 @@ void ACAVEOverlayController::Tick(float DeltaTime) { Super::Tick(DeltaTime); - if (!bDisplay_Cluster_Mode) return; // Not our business + if (!bCAVE_Mode) return; // Not our business RefreshPawnComponents(); if (!bAttached && Cave_Origin) diff --git a/Source/CAVEOverlay/Public/CAVEOverlayController.h b/Source/CAVEOverlay/Public/CAVEOverlayController.h index af238828aea072adf42eb07f02e502c6230507b1..9ea5ba1b1645b75c1924d40b3e2a884ada0e458c 100644 --- a/Source/CAVEOverlay/Public/CAVEOverlayController.h +++ b/Source/CAVEOverlay/Public/CAVEOverlayController.h @@ -29,8 +29,7 @@ protected: private: //Execution Modes - bool bHMD_Mode = false; - bool bDisplay_Cluster_Mode = false; + bool bCAVE_Mode = false; //Screen Types enum EScreen_Type { SCREEN_MASTER, SCREEN_NORMAL, SCREEN_DOOR_PARTIAL, SCREEN_DOOR };