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

Method CheckForWindowResize

Source/Engine/Platform/GDK/GDKWindow.cpp:203–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203void GDKWindow::CheckForWindowResize()
204{
205 // Skip for minimized window (GetClientRect for minimized window returns 0)
206 if (_minimized)
207 return;
208
209 ASSERT(HasHWND());
210
211 // Cache client size
212 RECT rect;
213 GetClientRect(_handle, &rect);
214 const int32 width = Math::Max(rect.right - rect.left, 0L);
215 const int32 height = Math::Max(rect.bottom - rect.top, 0L);
216 _clientSize = Float2(static_cast<float>(width), static_cast<float>(height));
217
218 // Check if window size has been changed
219 if (width > 0 && height > 0 && (_swapChain == nullptr || width != _swapChain->GetWidth() || height != _swapChain->GetHeight()))
220 {
221 OnResize(width, height);
222 }
223}
224
225void GDKWindow::UpdateCursor() const
226{

Callers

nothing calls this directly

Calls 5

Float2Class · 0.85
GetWidthMethod · 0.80
HasHWNDFunction · 0.70
MaxFunction · 0.50
GetHeightMethod · 0.45

Tested by

no test coverage detected