Skip to content

Commit

Permalink
Merge pull request #128 from seskid/feature/support-1440p-scale
Browse files Browse the repository at this point in the history
Support 1440p resolution scale
  • Loading branch information
TheElixZammuto authored Apr 22, 2024
2 parents d622fe1 + e1a6fa9 commit 808ed29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Common/DeviceResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,14 @@ void DX::DeviceResources::UpdateRenderTargetSize()
{
auto state = GetApplicationState();
m_effectiveDpi = m_dpi;
int compositionScaleMultiplier = 1;
double compositionScaleMultiplier = 1;

Windows::Graphics::Display::Core::HdmiDisplayInformation^ hdi = Windows::Graphics::Display::Core::HdmiDisplayInformation::GetForCurrentView();
// HDR Setup
if (hdi) {
auto mode = hdi->GetCurrentDisplayMode();
if (mode->ResolutionWidthInRawPixels > 1920)compositionScaleMultiplier = 2;
if (mode->ResolutionWidthInRawPixels > 2560)compositionScaleMultiplier = 2;
else if (mode->ResolutionWidthInRawPixels > 1920)compositionScaleMultiplier = 1.33333333;
}

m_effectiveCompositionScaleX = m_compositionScaleX * compositionScaleMultiplier;
Expand Down

0 comments on commit 808ed29

Please sign in to comment.