diff --git a/wps/wpsbuild.pl b/wps/wpsbuild.pl index a420faddd8..35febe3bcb 100755 --- a/wps/wpsbuild.pl +++ b/wps/wpsbuild.pl @@ -10,6 +10,7 @@ use strict; use Getopt::Long qw(:config pass_through); # pass_through so not confused by -DTYPE_STUFF +use IPC::Open2; my $ROOT=".."; my $wpsdir; @@ -87,11 +88,11 @@ if(!$wpslist) { sub getlcdsizes { my ($remote) = @_; + my $str; - open(GCC, ">gcctemp"); if($remote) { # Get the remote LCD screen size - print GCC <) { + my ($height, $width, $depth, $touch); + while() { if($_ =~ /^Height: (\d*)/) { $height = $1; } @@ -129,12 +131,11 @@ STOP elsif($_ =~ /^Depth: (\d*)/) { $depth = $1; } - if($height && $width && $depth) { - last; + if($_ =~ /^Touchscreen/) { + $touch = 1; } } - close(GETSIZE); - unlink("gcctemp"); + close(COUT); return ($height, $width, $depth); }