diff --git a/xbox/native-bios/App.cpp b/xbox/native-bios/App.cpp index 7ba2a883a..4b20e2348 100644 --- a/xbox/native-bios/App.cpp +++ b/xbox/native-bios/App.cpp @@ -16,6 +16,7 @@ using namespace Windows::Devices::Enumeration; using namespace Windows::Devices::Midi; using namespace Windows::Graphics::Imaging; using namespace Windows::Graphics::Display; +using namespace Windows::Graphics::Display::Core; using namespace Windows::Security::ExchangeActiveSyncProvisioning; using namespace Windows::Storage; using namespace Windows::Storage::Streams; @@ -352,7 +353,7 @@ public: m_api = std::make_unique(Api{{1920, 1080, 1}, {}, {}, {}, *m_graphics, *m_sound, {}}); m_api->system.render_width = m_frameWidth; m_api->system.render_height = m_frameHeight; - m_api->system.version = "1.0.0.40"; + m_api->system.version = "1.0.0.41"; m_api->telemetry = [this](std::string_view line) { std::string safe(line); for (auto& character : safe) if (character == '\n' || character == '\r') character = ' '; @@ -576,10 +577,16 @@ private: unsigned requestedWidth = 1920; unsigned requestedHeight = 1080; try { + const auto hdmi = HdmiDisplayInformation::GetForCurrentView(); + const auto mode = hdmi ? hdmi->GetCurrentDisplayMode() : nullptr; + if (mode) { + requestedWidth = (std::min)(3840u, mode->ResolutionWidthInRawPixels); + requestedHeight = (std::min)(2160u, mode->ResolutionHeightInRawPixels); + } const auto display = DisplayInformation::GetForCurrentView(); const auto rawWidth = display->ScreenWidthInRawPixels; const auto rawHeight = display->ScreenHeightInRawPixels; - if (rawWidth >= 1920 && rawHeight >= 1080) { + if (requestedWidth <= 1920 && rawWidth >= 1920 && rawHeight >= 1080) { requestedWidth = (std::min)(3840u, rawWidth); requestedHeight = (std::min)(2160u, rawHeight); } diff --git a/xbox/native-bios/Package.appxmanifest b/xbox/native-bios/Package.appxmanifest index 419b77743..93442a6fa 100644 --- a/xbox/native-bios/Package.appxmanifest +++ b/xbox/native-bios/Package.appxmanifest @@ -2,10 +2,11 @@ + xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" + IgnorableNamespaces="uap mp rescap"> + Version="1.0.0.41" /> @@ -50,6 +51,7 @@ + diff --git a/xbox/native-bios/pch.h b/xbox/native-bios/pch.h index a72c5e4f3..87a09ab3f 100644 --- a/xbox/native-bios/pch.h +++ b/xbox/native-bios/pch.h @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include