MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / HandleWindowSizeChanged

Method HandleWindowSizeChanged

StereoKitC/platforms/uwp.cpp:562–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560 ///////////////////////////////////////////
561
562 void HandleWindowSizeChanged() {
563 int32_t output_width = maxi(1,(int32_t)dips_to_pixels(m_logicalWidth, m_DPI));
564 int32_t output_height = maxi(1,(int32_t)dips_to_pixels(m_logicalHeight, m_DPI));
565
566 DXGI_MODE_ROTATION rotation = ComputeDisplayRotation();
567
568 if (rotation == DXGI_MODE_ROTATION_ROTATE90 || rotation == DXGI_MODE_ROTATION_ROTATE270) {
569 int32_t swap_tmp = output_width;
570 output_width = output_height;
571 output_height = swap_tmp;
572 }
573
574 if (output_width == uwp_windows[win_id].resize_x &&
575 output_height == uwp_windows[win_id].resize_y)
576 return;
577
578 uwp_windows[win_id].resize_pending = true;
579 uwp_windows[win_id].resize_x = output_width;
580 uwp_windows[win_id].resize_y = output_height;
581 }
582};
583
584///////////////////////////////////////////

Callers

nothing calls this directly

Calls 2

maxiFunction · 0.85
dips_to_pixelsFunction · 0.85

Tested by

no test coverage detected