diff options
author | nanahi <130121847+na-na-hi@users.noreply.github.com> | 2024-04-15 22:47:20 -0400 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2024-04-18 16:28:21 +0200 |
commit | 96e1f1dfa587a4f21e8a7264ab9e28fad7e5739b (patch) | |
tree | 15e6ea8dfc5214e006775454c2a7ac967d6f4fb4 /video/out/gpu/context.h | |
parent | d5ec0698291692eda03f9204e3201fd739ece207 (diff) | |
download | mpv-96e1f1dfa587a4f21e8a7264ab9e28fad7e5739b.tar.bz2 mpv-96e1f1dfa587a4f21e8a7264ab9e28fad7e5739b.tar.xz |
video/out/gpu/context: convert --gpu-context to use obj_settings_list
Since the list of available GPU contexts is a compile time constant,
use obj_settings_list instead of opt_string_validate for GPU contexts.
This has several advantages:
- Aligns with the existing usage of vo, ao, and filter lists.
- Allows custom probing order.
- Allows list option suffixes. (--gpu-context-append, etc.)
- Allows autocomplete in console.lua.
- Uses the standard obj_settings_list help printing, so the custom
help printing function is no longer needed.
This also deduplicates some context creation code for ra_ctx_create
and ra_ctx_create_by_name.
Diffstat (limited to 'video/out/gpu/context.h')
-rw-r--r-- | video/out/gpu/context.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/gpu/context.h b/video/out/gpu/context.h index f7107c9a71..0b422384d8 100644 --- a/video/out/gpu/context.h +++ b/video/out/gpu/context.h @@ -10,7 +10,7 @@ struct ra_ctx_opts { bool want_alpha; // create an alpha framebuffer if possible bool debug; // enable debugging layers/callbacks etc. bool probing; // the backend was auto-probed - char *context_name; // filter by `ra_ctx_fns.name` + struct m_obj_settings *context_list; // list of `ra_ctx_fns.name` to probe char *context_type; // filter by `ra_ctx_fns.type` }; |