As of the latest code base this is the function:
1 2 3 4 5 6 7 8 9 10 11 12 | internal win32_window_dimension Win32GetWindowDimension(HWND Window) { win32_window_dimension Result; RECT ClientRect; GetClientRect(Window, &ClientRect); Result.Width = ClientRect.right - ClientRect.left; Result.Height = ClientRect.bottom - ClientRect.top; return(Result); } |
However since the image is top down ClientRect.left & ClientRect.top are always 0 so why does the subtraction take place. Is there any reason that this cannot be:
1 2 3 4 5 6 7 8 9 10 11 12 | internal win32_window_dimension Win32GetWindowDimension(HWND Window) { win32_window_dimension Result; RECT ClientRect; GetClientRect(Window, &ClientRect); Result.Width = ClientRect.right; Result.Height = ClientRect.bottom; return(Result); } |