diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-21 02:18:28 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-23 13:46:40 +0300 |
commit | 78172918ff4c7df7c9d1305dbfc48a8df409e470 (patch) | |
tree | 664cd8c4d580ed5e487ce03f0d5a89ad40965699 /command.c | |
parent | 432e8ff4a568b1040cae43df4aa6a602c86c6162 (diff) | |
download | mpv-78172918ff4c7df7c9d1305dbfc48a8df409e470.tar.bz2 mpv-78172918ff4c7df7c9d1305dbfc48a8df409e470.tar.xz |
Move vo_screenwidth,vo_screenheight to options struct
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -69,13 +69,14 @@ extern int use_menu; static void rescale_input_coordinates(struct MPContext *mpctx, int ix, int iy, double *dx, double *dy) { + struct MPOpts *opts = &mpctx->opts; struct vo *vo = mpctx->video_out; //remove the borders, if any, and rescale to the range [0,1],[0,1] if (vo_fs) { //we are in full-screen mode - if (vo_screenwidth > vo->dwidth) //there are borders along the x axis - ix -= (vo_screenwidth - vo->dwidth) / 2; - if (vo_screenheight > vo->dheight) //there are borders along the y axis (usual way) - iy -= (vo_screenheight - vo->dheight) / 2; + if (opts->vo_screenwidth > vo->dwidth) //there are borders along the x axis + ix -= (opts->vo_screenwidth - vo->dwidth) / 2; + if (opts->vo_screenheight > vo->dheight) //there are borders along the y axis (usual way) + iy -= (opts->vo_screenheight - vo->dheight) / 2; if (ix < 0 || ix > vo->dwidth) { *dx = *dy = -1.0; @@ -92,7 +93,7 @@ static void rescale_input_coordinates(struct MPContext *mpctx, int ix, int iy, mp_msg(MSGT_CPLAYER, MSGL_V, "\r\nrescaled coordinates: %.3lf, %.3lf, screen (%d x %d), vodisplay: (%d, %d), fullscreen: %d\r\n", - *dx, *dy, vo_screenwidth, vo_screenheight, vo->dwidth, + *dx, *dy, opts->vo_screenwidth, opts->vo_screenheight, vo->dwidth, vo->dheight, vo_fs); } |