1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: window_size: normalize dpi scaling (#8738)

This commit is contained in:
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

View File

@ -709,7 +709,8 @@ pub fn screen_size() Size {
// window_size returns the `Size` of the active window // window_size returns the `Size` of the active window
pub fn window_size() Size { 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() fn C.WaitMessage()