[vlc-commits] [Git][videolan/vlc][master] opengl: fix missing option subcat

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Fri Jan 14 07:08:38 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
33d198b0 by Lyndon Brown at 2022-01-14T06:52:18+00:00
opengl: fix missing option subcat

and a couple of syntax issues.

the hidden subcat is used here rather than `SUBCAT_VIDEO_VFILTER` because
according to discussion in !1181 this option is just used as a hack, not
meant for use as a normal user config option.

lack of a subcat entry when there are options is normally because the
author forgot it, which causes a bug of the options not being visible in
GUI preferences. we should at least have a comment here to highlight that
it is deliberate in this special case.

however, a test for option set validity could be added in future, which
would only end up failing on lack of subcat entry here, so to avoid that
let's add one. using the hidden subcat will "properly" keep the option
hidden from GUI prefs (and also potentially help output if the help output
logic ends up gaining the ability to also skip such hidden options).

- - - - -


1 changed file:

- modules/video_output/opengl/filter_draw.c


Changes:

=====================================
modules/video_output/opengl/filter_draw.c
=====================================
@@ -228,10 +228,12 @@ error:
 }
 
 vlc_module_begin()
-    add_shortcut("draw");
+    add_shortcut("draw")
     set_shortname("draw")
     set_capability("opengl filter", 0)
     set_callback_opengl_filter(Open)
-    add_bool(DRAW_CFG_PREFIX "vflip", false, \
+    /* Hide the option - this is just used as a hack and not meant for user config */
+    set_subcategory(SUBCAT_HIDDEN)
+    add_bool(DRAW_CFG_PREFIX "vflip", false,
              DRAW_VFLIP_SHORTTEXT, DRAW_VFLIP_LONGTEXT)
 vlc_module_end()



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/33d198b005a0f1319fe63d2384077e2f302324c4

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/33d198b005a0f1319fe63d2384077e2f302324c4
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list