diff options
author | wm4 <wm4@nowhere> | 2016-03-07 22:20:51 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-03-07 22:22:18 +0100 |
commit | 5fa45fb5641c95a5dc65faac2087d842333b5425 (patch) | |
tree | 0807f5cff191b18427b36ebf5d30de25620ae033 /sub/osd_libass.c | |
parent | b7617f42d873adceebd3904d906e4eff818240ed (diff) | |
download | mpv-5fa45fb5641c95a5dc65faac2087d842333b5425.tar.bz2 mpv-5fa45fb5641c95a5dc65faac2087d842333b5425.tar.xz |
osd, lua: remove weird OSD scaling
Do not scale OSD mouse input to the ASS OSD script resolution. The
original idea of this mechanism was that the user doesn't have to care
about the actual resolution of anything, and can just use the OSD
resolution consistently. But this made things worse.
Remove the implicit scaling, and always use the screen resolution.
(Except with --vo=xv, where additional scaling is forced upon
everything.)
Drop get_osd_resolution(). There is no replacement. Rename
get_screen_size() and get_screen_margins() to use "osd" instead of
"screen". For anything but --vo=xv these are equivalent, but with
--vo=xv the OSD resolution has additional implicit scaling.
Add code to osc.lua which emulates the old behavior.
Note that none of the changed functions were public API, so implicit
breakage of scripts which used it is just going to happen.
Diffstat (limited to 'sub/osd_libass.c')
-rw-r--r-- | sub/osd_libass.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/sub/osd_libass.c b/sub/osd_libass.c index eed2822380..cd28396746 100644 --- a/sub/osd_libass.c +++ b/sub/osd_libass.c @@ -477,13 +477,3 @@ void osd_object_get_bitmaps(struct osd_state *osd, struct osd_object *obj, &obj->parts_cache, out_imgs); talloc_steal(obj, obj->parts_cache); } - -void osd_object_get_resolution(struct osd_state *osd, int obj, - int *out_w, int *out_h) -{ - pthread_mutex_lock(&osd->lock); - struct osd_object *osd_obj = osd->objs[obj]; - *out_w = osd_obj->osd_track ? osd_obj->osd_track->PlayResX : 0; - *out_h = osd_obj->osd_track ? osd_obj->osd_track->PlayResY : 0; - pthread_mutex_unlock(&osd->lock); -} |