Skip to content

Commit

Permalink
Merge tag 'alpha-2-resfix' into MesaBuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Misunderstood-Wookiee committed May 12, 2024
2 parents 9910da0 + 291d3d0 commit a05f44c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions uwp/uwp_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,16 +953,9 @@ extern "C" {
{
if (is_running_on_xbox())
{
#ifdef HAVE_OPENGL
//For whatever reason, this is not correct when initializing a Mesa GL context. Using the default method instead
Windows::UI::Core::CoreWindow^ coreWindow = Windows::UI::Core::CoreWindow::GetForCurrentThread();
DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView();
ret = ConvertDipsToPixels(coreWindow->Bounds.Bottom - coreWindow->Bounds.Top, currentDisplayInformation->LogicalDpi);
#else
const Windows::Graphics::Display::Core::HdmiDisplayInformation^ hdi = Windows::Graphics::Display::Core::HdmiDisplayInformation::GetForCurrentView();
if (hdi)
ret = Windows::Graphics::Display::Core::HdmiDisplayInformation::GetForCurrentView()->GetCurrentDisplayMode()->ResolutionHeightInRawPixels;
#endif
}

if (ret == -1)
Expand Down Expand Up @@ -998,16 +991,9 @@ extern "C" {
{
if (is_running_on_xbox())
{
#ifdef HAVE_OPENGL
//For whatever reason, this is not correct when initializing a Mesa GL context. Using the default method instead
Windows::UI::Core::CoreWindow^ coreWindow = Windows::UI::Core::CoreWindow::GetForCurrentThread();
DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView();
returnValue = ConvertDipsToPixels(coreWindow->Bounds.Right - coreWindow->Bounds.Left, currentDisplayInformation->LogicalDpi);
#else
const Windows::Graphics::Display::Core::HdmiDisplayInformation^ hdi = Windows::Graphics::Display::Core::HdmiDisplayInformation::GetForCurrentView();
if (hdi)
returnValue = Windows::Graphics::Display::Core::HdmiDisplayInformation::GetForCurrentView()->GetCurrentDisplayMode()->ResolutionWidthInRawPixels;
#endif
}

if(returnValue == -1)
Expand Down

0 comments on commit a05f44c

Please sign in to comment.