Apologies - I posted this in the wrong thread, so I'm reposting here
where it's more relevant.

I've found a fix to the 'whenOff' screensaver issue.  The issue was that
the screensaver was responding to the power state of the -previous-
player, rather than the current one - i.e. if I switched to a player
that was off, but the previous player was still on, I'd get the
'whenStopped' screensaver rather than the 'whenOff' screensaver (and
vice versa).  This could be fixed by power cycling the current player.

I've made a tweak that seems to fix this.  I commented out the line that
has my initials (CJH) and replaced it with the line below it.

Code:
--------------------
    function _getMode(self)
        local player = appletManager:callService("getCurrentPlayer")
        
  --CJH if not *self:isSoftPowerOn()* and System:hasSoftPower() then
        if not *player:isPowerOn()* and System:hasSoftPower() then
                return 'whenOff'
        else
                if player and player:getPlayMode() == "play" then
                        return 'whenPlaying'
                end
        end
        return 'whenStopped'
  end
  
--------------------


I must admit I don't understand what 'self' is referring to in this
function, but evidently 'self:isSoftPowerOn()' does not reflect the
power state of the current player after a change of player, whereas
'player:isPowerOn()' does.  I also don't know what
'System:hasSoftPower()' does - what is the 'System' here?

If there's a better way, such as updating 'self' somehow, I'm all ears. 
As it stands, the screensaver applet now behaves as I think it should on
a Joggler.  To summarise, my changes are:
1) A 'whenOff' screensaver is now an option even when there is no local
player
2) The screensaver now responds to the power state of the current
player: 'player:isPowerOn' rather than 'self:isSoftPowerOn()'
3) The header line of the screensaver menu is never shown - I never did
understand which buttons were meant in that text, e.g. "Press the center
button to choose a screensaver, play to preview."
4) Touching the screen while the 'whenOff' screensaver is displayed now
deactivates the screensaver
5) Touching the screen while the 'whenOff' screensaver is displayed no
longer wakes the current player


------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=110135

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to