From 90222b309b7707b9ba83554f7f08d4017dd37de5 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Fri, 31 Aug 2012 02:48:25 +0300 Subject: [PATCH] op_tvout: never use zero width/height --- recipes/pandora-system/pandora-scripts.bb | 2 +- .../pandora-system/pandora-scripts/TVoutConfig.py | 11 +++++++++++ recipes/pandora-system/pandora-scripts/op_tvout.sh | 12 ++++++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/recipes/pandora-system/pandora-scripts.bb b/recipes/pandora-system/pandora-scripts.bb index 4802b2c..45f78a7 100644 --- a/recipes/pandora-system/pandora-scripts.bb +++ b/recipes/pandora-system/pandora-scripts.bb @@ -6,7 +6,7 @@ COMPATIBLE_MACHINE = "omap3-pandora" DEPENDS = "zenity dbus" RDEPENDS = "zenity dbus" -PR = "r112" +PR = "r113" SRC_URI = " \ file://op_paths.sh \ diff --git a/recipes/pandora-system/pandora-scripts/TVoutConfig.py b/recipes/pandora-system/pandora-scripts/TVoutConfig.py index 518356c..afeb723 100755 --- a/recipes/pandora-system/pandora-scripts/TVoutConfig.py +++ b/recipes/pandora-system/pandora-scripts/TVoutConfig.py @@ -226,6 +226,17 @@ class TVoutModel(ConfigModel): settings['width'], settings['height'] = settings.pop('size').split(',') settings['x'], settings['y'] = settings.pop('position').split(',') + # The system may have 0,0 w,h; use last_written or defaults if it does + for key in 'width', 'height': + if settings[key] == '0': + settings[key] = (self.last_written[key] if self.last_written[key] != '0' + else DC_DISABLED_DICT[key]) + + # 0,0 pos is more likely to be intended, but still fallback to last_written + for key in 'x', 'y': + if settings[key] == '0': + settings[key] = self.last_written[key] + # To determine the layer we interpret the framebuffer values fb0 = settings.pop('fb0') fb1 = settings.pop('fb1') diff --git a/recipes/pandora-system/pandora-scripts/op_tvout.sh b/recipes/pandora-system/pandora-scripts/op_tvout.sh index 65a6556..b10f748 100755 --- a/recipes/pandora-system/pandora-scripts/op_tvout.sh +++ b/recipes/pandora-system/pandora-scripts/op_tvout.sh @@ -96,7 +96,11 @@ while true; do ;; "-ps") shift - pal_size=$1 + if [ "$1" != "0,0" ]; then + pal_size=$1 + else + echo "warning: ignored pal_size: $1" + fi ;; "-pp") shift @@ -104,7 +108,11 @@ while true; do ;; "-ns") shift - ntsc_size=$1 + if [ "$1" != "0,0" ]; then + ntsc_size=$1 + else + echo "warning: ignored ntsc_size: $1" + fi ;; "-np") shift -- 2.39.5