MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnSizeChange

Method OnSizeChange

Source/Engine/Platform/UWP/UWPWindow.cpp:579–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577}
578
579void UWPWindow::OnSizeChange()
580{
581 // Update the actual rendering output resolution
582 _clientSize.X = ConvertDipsToPixels(_logicalSize.X, (float)_dpi);
583 _clientSize.Y = ConvertDipsToPixels(_logicalSize.Y, (float)_dpi);
584
585 // Check if output has been created
586 if (_swapChain != nullptr)
587 {
588 const int32 width = Math::Max((int32)_clientSize.X, 0);
589 const int32 height = Math::Max((int32)_clientSize.Y, 0);
590 if (width > 0 && height > 0 && (width != _swapChain->GetWidth() || height != _swapChain->GetHeight()))
591 {
592 OnResize(width, height);
593 }
594 }
595}
596
597#endif

Callers

nothing calls this directly

Calls 4

ConvertDipsToPixelsFunction · 0.85
GetWidthMethod · 0.80
MaxFunction · 0.50
GetHeightMethod · 0.45

Tested by

no test coverage detected