diff options
author | Dudemanguy <random342@airmail.cc> | 2024-02-13 17:30:46 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-02-24 20:31:08 +0000 |
commit | a3648ddac8382e2144feec6485328c6e53ae0062 (patch) | |
tree | 77c3f7df5ba5acd25d48a72939cf79074652b01a /video | |
parent | 006822434a8b551ffe1d4cabd1589ea51ff003e3 (diff) | |
download | mpv-a3648ddac8382e2144feec6485328c6e53ae0062.tar.bz2 mpv-a3648ddac8382e2144feec6485328c6e53ae0062.tar.xz |
win32: clean up hidpi window scale behavior
Same as X11. An accurate dpi scale should always be reported and
UNFS_WINDOW_SIZE shouldn't take dpi scale as an additional multiplier.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/w32_common.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 4f2e6f0e1e..cf807c0136 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -618,7 +618,7 @@ static void update_dpi(struct vo_w32_state *w32) } w32->dpi = dpi; - w32->dpi_scale = w32->opts->hidpi_window_scale ? w32->dpi / 96.0 : 1.0; + w32->dpi_scale = w32->dpi / 96.0; signal_events(w32, VO_EVENT_DPI); } @@ -2092,8 +2092,8 @@ static int gui_thread_control(struct vo_w32_state *w32, int request, void *arg) return VO_FALSE; RECT *rc = w32->current_fs ? &w32->prev_windowrc : &w32->windowrc; - s[0] = rect_w(*rc) / w32->dpi_scale; - s[1] = rect_h(*rc) / w32->dpi_scale; + s[0] = rect_w(*rc); + s[1] = rect_h(*rc); return VO_TRUE; } case VOCTRL_SET_UNFS_WINDOW_SIZE: { @@ -2102,9 +2102,6 @@ static int gui_thread_control(struct vo_w32_state *w32, int request, void *arg) if (!w32->window_bounds_initialized) return VO_FALSE; - s[0] *= w32->dpi_scale; - s[1] *= w32->dpi_scale; - RECT *rc = w32->current_fs ? &w32->prev_windowrc : &w32->windowrc; resize_and_move_rect(w32, rc, s[0], s[1]); |