-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 not_available 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. As a downside of this new approach, a bunch of windows-specific defines have to be explicitly handled which is ugly.
- Loading branch information
1 parent
7f49e87
commit 29d5ad8
Showing
8 changed files
with
133 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters