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

[RFC] options: convert some guarded options to new warning mechanism #14624

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 25, 2024

  1. options: convert some guarded options to new warning mechanism

    mpv has an internal inconsistency where some options are guarded at
    compile time and others are not. One advantage of guarding certain
    options is that it prevents users from using something that can't
    possibly work (e.g. windows-specific options on a linux machine).
    However, this hurts the portability of mpv config files and means it's
    possible for configs to break depending on a machine. This is not so
    nice.
    
    Attempt to have our cake and eat it too by introducing a new
    unavailable boolean which can optionally be set when defining options.
    Naturally, you just set this to the negation of the preprocessor that
    applies. Instead of doing a hard error, mpv will print out a generic
    warning message that you are trying to use an option that cannot ever
    work with the binary. The downside here is that some windows-specific
    options have special defines so we have to deal with some if/else junk
    which makes it a bit uglier.
    Dudemanguy committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    c359833 View commit details
    Browse the repository at this point in the history