summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_out/video_out_xcbxv.c4
-rw-r--r--src/video_out/video_out_xv.c4
-rw-r--r--src/video_out/video_out_xxmc.c4
-rw-r--r--src/video_out/xv_common.h6
4 files changed, 10 insertions, 8 deletions
diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c
index f1f14333d..fbf7ac1d8 100644
--- a/src/video_out/video_out_xcbxv.c
+++ b/src/video_out/video_out_xcbxv.c
@@ -1298,7 +1298,7 @@ static xcb_xv_port_t xv_autodetect_port(xv_driver_t *this,
for (; adaptor_it->rem; xcb_xv_adaptor_info_next(adaptor_it))
if (adaptor_it->data->type & XCB_XV_TYPE_IMAGE_MASK &&
(prefer_type == xv_prefer_none ||
- strcasestr (xcb_xv_adaptor_info_name (adaptor_it->data), prefer_types[prefer_type])))
+ strcasestr (xcb_xv_adaptor_info_name (adaptor_it->data), prefer_substrings[prefer_type])))
{
int j;
for (j = 0; j < adaptor_it->data->num_ports; ++j)
@@ -1372,7 +1372,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis
VIDEO_DEVICE_XV_PORT_HELP,
20, NULL, NULL);
prefer_type = config->register_enum (config, "video.device.xv_preferred_method", 0,
- prefer_types, VIDEO_DEVICE_XV_PREFER_TYPE_HELP,
+ prefer_labels, VIDEO_DEVICE_XV_PREFER_TYPE_HELP,
10, NULL, NULL);
if (xv_port != 0) {
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index d5d854ebf..2c25eb713 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -1347,7 +1347,7 @@ static XvPortID xv_autodetect_port(xv_driver_t *this,
for (an = 0; an < adaptors; an++)
if (adaptor_info[an].type & XvImageMask &&
(prefer_type == xv_prefer_none ||
- strcasestr (adaptor_info[an].name, prefer_types[prefer_type])))
+ strcasestr (adaptor_info[an].name, prefer_substrings[prefer_type])))
for (j = 0; j < adaptor_info[an].num_ports; j++) {
XvPortID port = adaptor_info[an].base_id + j;
if (port >= base && xv_open_port(this, port)) {
@@ -1419,7 +1419,7 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void *
VIDEO_DEVICE_XV_PORT_HELP,
20, NULL, NULL);
prefer_type = config->register_enum (config, "video.device.xv_preferred_method", 0,
- prefer_types, VIDEO_DEVICE_XV_PREFER_TYPE_HELP,
+ prefer_labels, VIDEO_DEVICE_XV_PREFER_TYPE_HELP,
10, NULL, NULL);
if (xv_port != 0) {
diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c
index d30e69247..732f9f712 100644
--- a/src/video_out/video_out_xxmc.c
+++ b/src/video_out/video_out_xxmc.c
@@ -2228,7 +2228,7 @@ static XvPortID xxmc_autodetect_port(xxmc_driver_t *this,
for (an = 0; an < adaptors; an++)
if (adaptor_info[an].type & XvImageMask &&
(prefer_type == xv_prefer_none ||
- strcasestr (adaptor_info[an].name, prefer_types[prefer_type])))
+ strcasestr (adaptor_info[an].name, prefer_substrings[prefer_type])))
for (j = 0; j < adaptor_info[an].num_ports; j++) {
XvPortID port = adaptor_info[an].base_id + j;
if (port >= base && xxmc_open_port(this, port)) {
@@ -2448,7 +2448,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi
VIDEO_DEVICE_XV_PORT_HELP,
20, NULL, NULL);
prefer_type = config->register_enum (config, "video.device.xv_preferred_method", 0,
- prefer_types, VIDEO_DEVICE_XV_PREFER_TYPE_HELP,
+ prefer_labels, VIDEO_DEVICE_XV_PREFER_TYPE_HELP,
10, NULL, NULL);
if (xv_port != 0) {
diff --git a/src/video_out/xv_common.h b/src/video_out/xv_common.h
index cac80c0aa..ac16a333a 100644
--- a/src/video_out/xv_common.h
+++ b/src/video_out/xv_common.h
@@ -65,8 +65,10 @@
typedef enum { \
xv_prefer_none, xv_prefer_overlay, xv_prefer_textured, \
} xv_prefertype; \
- static const char *const prefer_types[] = \
- { "Any", "Overlay", "Textured Video", NULL };
+ static const char *const prefer_labels[] = \
+ { "Any", "Overlay", "Textured Video", NULL }; \
+ static const char prefer_substrings[][8] = \
+ { "", "Overlay", "Texture" };
#define VIDEO_DEVICE_XV_PREFER_TYPE_HELP \
_("video display method preference"), \
_("Selects which video output method is preferred. " \