From: Grazvydas Ignotas Date: Thu, 30 Aug 2012 23:48:25 +0000 (+0300) Subject: op_tvout: never use zero width/height X-Git-Tag: sz_152~32 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=90222b309b7707b9ba83554f7f08d4017dd37de5;hp=12e5c4fa8e3c6637e1db0f7e17689fec978412fa op_tvout: never use zero width/height --- 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