gg: window_size: normalize dpi scaling (#8738)

pull/8790/head
Christopher Dieringer 2021-02-16 03:41:21 -08:00 committed by GitHub
parent 0520b755f4
commit 94429c8fd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -709,7 +709,8 @@ pub fn screen_size() Size {
// window_size returns the `Size` of the active window
pub fn window_size() Size {
return Size{sapp.width(), sapp.height()}
s := sapp.dpi_scale()
return Size{int(sapp.width() / s), int(sapp.height() / s)}
}
fn C.WaitMessage()