Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mpv Default] Shortcuts for changing window scale are inefficient #4053

Closed
Kergariou opened this issue Nov 8, 2022 · 4 comments · Fixed by #4063
Closed

[mpv Default] Shortcuts for changing window scale are inefficient #4053

Kergariou opened this issue Nov 8, 2022 · 4 comments · Fixed by #4063

Comments

@Kergariou
Copy link

System and IINA version:

  • macOS Monterey 12.6.1
  • IINA 1.3.1, 1.3.0

Expected behavior:
When choosing the mpv Default shortcuts, the window scale changing shortcuts are displayed in the menu "Video" and typing the the mpv shortcuts ⌥0, ⌥1, ⌥2 changes the scale of the window.

Actual behavior:
When choosing the mpv Default shortcuts, the window scale changing shortcuts are not displayed in the menu "Video" and typing the the mpv shortcuts ⌥0, ⌥1, ⌥2 do not affect the scale of the window.

Preferences:
IINA 1 3 1 French Preferences mpv Default window scale shortcuts

But in the menu Video:
IINA 1 3 1 French Playback mpv Default window scale shortcuts

And when clicking on every shortcuts ⌥0, ⌥1, ⌥2, we got:
IINA 1 3 1 French on screen

@svobs
Copy link
Contributor

svobs commented Nov 8, 2022

IINA currently only maps the window-scale property to the menu item, not the current-window-scale.

... Looks like the mpv default input.conf file got updated to use this new(?) command (see: 25a9e96).

Also strange: I tried to reproduce this on my M1 Mac / IINA 1.3.1b133, and nothing happened for any of these commands. No OSD message.

The mpv manual seems to be doing an impression of an IRS manual as it describes this feature, which seems to assume familiarity with the window-scale feature, so I'm including it as well.

current-window-scale (RW)
The window-scale value calculated from the current window size. This has the same value as window-scale if the window size was not changed since setting the option, and the window size was not restricted in other ways. If the window is fullscreened, this will return the scale value calculated from the last non-fullscreen size of the window. The property is unavailable if no video is active.

When setting this property in the fullscreen or maximized state, the behavior is the same as window-scale. In all ther cases, setting the value of this property will always resize the window. This does not affect the value of window-scale.

window-scale (RW)
Window size multiplier. Setting this will resize the video window to the values contained in dwidth and dheight multiplied with the value set with this property. Setting 1 will resize to original video size (or to be exact, the size the video filters output). 2 will set the double size, 0.5 halves the size.

Note that setting a value identical to its previous value will not resize the window. That's because this property mirrors the window-scale option, and setting an option to its previous value is ignored. If this value is set while the window is in a fullscreen, the multiplier is not applied until the window is taken out of that state. Writing this property to a maximized window can unmaximize the window depending on the OS and window manager. If the window does not unmaximize, the multiplier will be applied if the user unmaximizes the window later.

See current-window-scale for the value derived from the actual window size.

Since mpv 0.31.0, this always returns the previously set value (or the default value), instead of the value implied by the actual window size. Before mpv 0.31.0, this returned what current-window-scale returns now, after the window was created.

Hopefully someone knows what it's trying to say here?

@low-batt
Copy link
Contributor

Reproduced for me as well. Confirmed regression from IINA 1.2.0.

I too am confused by the mpv documentation. I can explain this aspect of the issue:

No OSD message.

The OSD message seen in the screenshot above comes from mpv, not IINA. To reproduce that enable mpv's OSD by following these instructions:

  • Start IINA
  • Click on Preferences… under the IINA menu
  • The preference panel appears
  • On the left side of the panel click on Advanced
  • Slide the Enable advanced settings toggle button to be on (blue)
  • Click on the checkbox Use mpv's OSD
  • Restart IINA to activate the change

@low-batt
Copy link
Contributor

The fix for this issue has been merged into the IINA develop branch. Once the fix has been included in an official release this issue will be closed.

Should you wish to confirm the fix is working and do not have the ability to build IINA from the sources in the develop branch, at some point a new unsigned nightly build will be available for download. If you encounter a regression in a nightly build that has not been reported please enter an issue for it and be sure to indicate the problem was found in a nightly build.

@Kergariou
Copy link
Author

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants