[Slim-Checkins] r10368 - in /branches/6.5/server: Changelog6.html
Slim/Buttons/Common.pm
Slim/Display/Display.pm Slim/Display/Graphics.pm
Slim/Display/Squeezebox2.pm Slim/Display/Transporter.pm
Slim/Player/Player.pm
adrian at svn.slimdevices.com
adrian at svn.slimdevices.com
Mon Oct 16 10:47:20 PDT 2006
Author: adrian
Date: Mon Oct 16 10:47:13 2006
New Revision: 10368
URL: http://svn.slimdevices.com?rev=10368&view=rev
Log:
Bug: 4009
Description: merge -r 10344:10345 from trunk
Modified:
branches/6.5/server/Changelog6.html
branches/6.5/server/Slim/Buttons/Common.pm
branches/6.5/server/Slim/Display/Display.pm
branches/6.5/server/Slim/Display/Graphics.pm
branches/6.5/server/Slim/Display/Squeezebox2.pm
branches/6.5/server/Slim/Display/Transporter.pm
branches/6.5/server/Slim/Player/Player.pm
Modified: branches/6.5/server/Changelog6.html
URL: http://svn.slimdevices.com/branches/6.5/server/Changelog6.html?rev=10368&r1=10367&r2=10368&view=diff
==============================================================================
--- branches/6.5/server/Changelog6.html (original)
+++ branches/6.5/server/Changelog6.html Mon Oct 16 10:47:13 2006
@@ -31,6 +31,7 @@
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3696">#3696</a> - Random Mix fails</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3915">#3915</a> - Softsqueeze animate on screen 2 clears screen 1</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3946">#3915</a> - Softsqueeze skin updates</li>
+ <li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4009">#4009</a> - screen2 display does not update while screen1 is animating</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4024">#4024</a> - Artist name is not shown in Squeezebox display if ALBUMARTIST is set</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4071">#4071</a> - Band Names in mp3 Tags don't always work</li>
<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=4077">#4077</a> - CUE files YEAR and GENRE not always working</li>
Modified: branches/6.5/server/Slim/Buttons/Common.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Buttons/Common.pm?rev=10368&r1=10367&r2=10368&view=diff
==============================================================================
--- branches/6.5/server/Slim/Buttons/Common.pm (original)
+++ branches/6.5/server/Slim/Buttons/Common.pm Mon Oct 16 10:47:13 2006
@@ -1891,17 +1891,14 @@
$client->periodicUpdateTime($time);
- if ($client->display->updateMode) {
- return;
- }
-
- # updates not blocked
- if ($update) {
- $client->display->update();
- }
-
- if ($update2 && !$client->display->animateState() && (my $linefunc = $client->lines2periodic()) ) {
- $client->display->update({ 'screen2' => &$linefunc($client, 1) });
+ my $display = $client->display;
+
+ if ($update && !$display->updateMode) {
+ $display->update();
+ }
+
+ if ($update2 && (!$display->updateMode || $display->screen2updateOK) && (my $linefunc = $client->lines2periodic()) ) {
+ $client->display->update({ 'screen2' => &$linefunc($client, 1) }, undef, 1);
}
}
Modified: branches/6.5/server/Slim/Display/Display.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Display/Display.pm?rev=10368&r1=10367&r2=10368&view=diff
==============================================================================
--- branches/6.5/server/Slim/Display/Display.pm (original)
+++ branches/6.5/server/Slim/Display/Display.pm Mon Oct 16 10:47:13 2006
@@ -24,12 +24,16 @@
use Slim::Utils::Timers;
# Display routines use the following state variables:
-# $display->updateMode() and $display->animateState(), $display->scrollState()
+# $display->updateMode(), $display->screen2updateOK(), $display->animateState(), $display->scrollState()
#
# updateMode: (single value for all screens)
# 0 = normal
# 1 = periodic updates are blocked
# 2 = all updates are blocked
+#
+# screen2updateOK: single value for second screen to allow periodic update to screen 2 while updateMode set
+# 0 = use status of updateMode
+# 1 = allow periodic updates of screen2 to bypass updateMode check [animation or showBriefly on screen 1 only]
#
# animateState: (single value for all screens) Slimp3/SB1 SB1G SB2/3/Transporter
# 0 = no animation x x x
@@ -76,6 +80,7 @@
$display->[8] = undef; # sbCallbackData
$display->[9] = undef; # sbOldDisplay
$display->[10]= undef; # sbName
+ $display->[11]= 0; # screen2updateOK
$display->resetDisplay(); # init render cache
@@ -133,7 +138,10 @@
my $r = shift;
@_ ? ($r->[10] = shift) : $r->[10];
}
-
+sub screen2updateOK {
+ my $r = shift;
+ @_ ? ($r->[11] = shift) : $r->[11];
+}
################################################################################################
@@ -141,17 +149,9 @@
sub update {
my $display = shift;
my $lines = shift;
-
+ my $scrollMode = shift; # 0 = normal scroll, 1 = scroll once only, 2 = no scroll, 3 = scroll once and end
+ my $s2periodic = shift; # flag to indicate called by peridic update for screen 2 [to bypass some state checks]
my $client = $display->client;
-
- # 0 = normal scroll, 1 = scroll once only, 2 = no scroll, 3 = scroll once and end
- my $scrollMode = shift || $client->paramOrPref('scrollMode') || 0;
-
- # return if updates are blocked
- return if ($display->updateMode() == 2);
-
- # clear any server side animations or pending updates, don't kill scrolling
- $display->killAnimation(1) if ($display->animateState() > 0);
my $parts;
if (defined($lines)) {
@@ -161,13 +161,32 @@
$parts = $display->parseLines(&$linefunc($client));
}
+ unless ($s2periodic && $display->screen2updateOK) {
+
+ # return if updates are blocked
+ return if ($display->updateMode() == 2);
+
+ # clear any server side animations or pending updates, don't kill scrolling
+ $display->killAnimation(1) if ($display->animateState() > 0);
+
+ } elsif ($display->sbOldDisplay()) {
+
+ # replace any stored screen 2 for show briefly
+ $display->sbOldDisplay()->{'screen2'} = $parts->{'screen2'};
+
+ }
+
+ if (!defined $scrollMode) {
+ $scrollMode = $client->paramOrPref('scrollMode') || 0;
+ }
+
my ($scroll, $scrollonce);
if ($scrollMode == 0) { $scroll = 1; $scrollonce = 0; }
elsif ($scrollMode == 1) { $scroll = 1; $scrollonce = 1; }
elsif ($scrollMode == 2) { $scroll = 0; $scrollonce = 0; }
elsif ($scrollMode == 3) { $scroll = 2; $scrollonce = 2; }
- my $render = $display->render($parts, $scroll);
+ my $render = $display->render($parts, $scroll, $s2periodic);
foreach my $screenNo (1..$render->{screens}) {
@@ -204,7 +223,7 @@
}
# return any old display if stored
- $display->returnOldDisplay($render) if $display->sbOldDisplay();
+ $display->returnOldDisplay($render) if (!$s2periodic && $display->sbOldDisplay());
}
# show text briefly and then return to original display
@@ -255,6 +274,7 @@
$display->update($parsed, $scrollToEnd ? 3 : undef);
+ $display->screen2updateOK( ($oldDisplay->{'screen2'} && !$parsed->{'screen2'} && !$display->updateMode) ? 1 : 0 );
$display->updateMode( $blockUpdate ? 2 : 1 );
$display->animateState(5);
@@ -694,6 +714,7 @@
my $screen = ($animate <= 3) ? $display->renderCache() : undef;
$display->animateState(0);
$display->updateMode(0);
+ $display->screen2updateOK(0);
$display->endShowBriefly() if ($animate == 5);
$display->update($screen);
}
Modified: branches/6.5/server/Slim/Display/Graphics.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Display/Graphics.pm?rev=10368&r1=10367&r2=10368&view=diff
==============================================================================
--- branches/6.5/server/Slim/Display/Graphics.pm (original)
+++ branches/6.5/server/Slim/Display/Graphics.pm Mon Oct 16 10:47:13 2006
@@ -89,6 +89,7 @@
my $display = shift;
my $parts = shift;
my $scroll = shift || 0; # 0 = no scroll, 1 = wrapped scroll if line too long, 2 = non wrapped scroll
+ my $s2periodic = shift; # this render is for a periodic screen 2 update - suppress some state changes
my $client = $display->client;
if ((ref($parts) ne 'HASH')) {
@@ -166,7 +167,7 @@
# reset flags per render
$sc->{newscroll} = 0;
$sc->{changed} = 0;
- $sc->{present} = 0 unless $rerender;
+ $sc->{present} = 0 unless ($rerender || $s2periodic);
# reset cache for screen if screensize or default font has changed
if ($screensize != $sc->{ssize} || $newDefaultFont) {
Modified: branches/6.5/server/Slim/Display/Squeezebox2.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Display/Squeezebox2.pm?rev=10368&r1=10367&r2=10368&view=diff
==============================================================================
--- branches/6.5/server/Slim/Display/Squeezebox2.pm (original)
+++ branches/6.5/server/Slim/Display/Squeezebox2.pm Mon Oct 16 10:47:13 2006
@@ -385,7 +385,7 @@
my $display = shift;
$display->animateState(2);
- $display->updateMode(1);
+ $display->updateMode(0);
Slim::Utils::Timers::setTimer($display, Time::HiRes::time() + 0.5, \&Slim::Display::Display::update, $display->renderCache());
}
@@ -401,6 +401,7 @@
$display->scrollStop($screenNo) if (($display->scrollState($screenNo) > 0) && !$exceptScroll);
$display->animateState(0);
$display->updateMode(0);
+ $display->screen2updateOK(0);
$display->endShowBriefly() if ($animate == 5);
}
Modified: branches/6.5/server/Slim/Display/Transporter.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Display/Transporter.pm?rev=10368&r1=10367&r2=10368&view=diff
==============================================================================
--- branches/6.5/server/Slim/Display/Transporter.pm (original)
+++ branches/6.5/server/Slim/Display/Transporter.pm Mon Oct 16 10:47:13 2006
@@ -262,6 +262,7 @@
# animate screen 1 only
$display->killAnimation(undef, 1);
$display->drawFrameBuf($render->{screen1}->{bitsref}, 0, $trans, $param1);
+ $display->screen2updateOK(1);
}
$display->animateState(1);
Modified: branches/6.5/server/Slim/Player/Player.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Player/Player.pm?rev=10368&r1=10367&r2=10368&view=diff
==============================================================================
--- branches/6.5/server/Slim/Player/Player.pm (original)
+++ branches/6.5/server/Slim/Player/Player.pm Mon Oct 16 10:47:13 2006
@@ -394,6 +394,7 @@
'graphic-280x16' => 'medium',
'text' => 2,
},
+ 'screen2' => {},
}, undef, undef, 1);
# check if there is a sync group to restore
More information about the checkins
mailing list