From bfc3b5f9d06614624aa775e9c8717f5bc87ce8a1 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Thu, 5 Mar 2020 09:41:15 +0100 Subject: [PATCH] libarmbox/video.cpp: fix aspect settings for osmio --- libarmbox/video.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 76fdb2a..dc0f855 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -455,7 +455,11 @@ int cVideo::setAspectRatio(int aspect, int mode) { static const char *a[] = { "n/a", "4:3", "14:9", "16:9" }; // static const char *m[] = { "panscan", "letterbox", "bestfit", "nonlinear", "(unset)" }; +#if BOXMODEL_OSMIO4K || BOXMODEL_OSMIO4KPLUS + static const char *m[] = { "letterbox", "panscan", "scale", "(unset)", "(unset)" }; +#else static const char *m[] = { "letterbox", "panscan", "bestfit", "nonlinear", "(unset)" }; +#endif int n; int mo = (mode < 0||mode > 3) ? 4 : mode; @@ -473,9 +477,13 @@ int cVideo::setAspectRatio(int aspect, int mode) if (mode == -1) return 0; - +#if BOXMODEL_OSMIO4K || BOXMODEL_OSMIO4KPLUS + hal_debug("%s: /proc/stb/video/policy2 -> %s\n", __func__, m[mo]); + n = proc_put("/proc/stb/video/policy2", m[mo], strlen(m[mo])); +#else hal_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mo]); n = proc_put("/proc/stb/video/policy", m[mo], strlen(m[mo])); +#endif if (n < 0) return 1; return 0;