You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unsafe fn update_dimensions(&mut self, hwnd: HWND) -> bool {
....
let window_width = ((rect.right - rect.left) as f32 / self.window_scale) as i32;
let window_height = ((rect.bottom - rect.top) as f32 / self.window_scale) as i32;
// prevent a framebuffer size of 0 when window is minimized
let fb_width = ((window_width as f32 * self.content_scale) as i32).max(1);
let fb_height = ((window_height as f32 * self.content_scale) as i32).max(1);
if fb_width != d.screen_width || fb_height != d.screen_height {
d.screen_width = fb_width;
d.screen_height = fb_height;
return true;
}
example:
window height : 600, scale :1.75
let window_width = ((rect.right - rect.left) as f32 / self.window_scale) as i32; [<-- 342]
let fb_height = ((window_height as f32 * self.content_scale) as i32).max(1); [ <-- 598 ]
d.screen_height will been assigned 598
The text was updated successfully, but these errors were encountered:
in src/native/windows.rc:
example:
window height : 600, scale :1.75
let window_width = ((rect.right - rect.left) as f32 / self.window_scale) as i32; [<-- 342]
let fb_height = ((window_height as f32 * self.content_scale) as i32).max(1); [ <-- 598 ]
d.screen_height will been assigned 598
The text was updated successfully, but these errors were encountered: