mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 18:05:21 +00:00
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.
This commit is contained in:
parent
006822434a
commit
a3648ddac8
@ -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]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user