Skip to content

Commit

Permalink
jsonrpc: reset system idle timer when an Input method is executed (th…
Browse files Browse the repository at this point in the history
…anks amet)
  • Loading branch information
Montellese committed Jan 2, 2012
1 parent fabc053 commit 95aeff2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xbmc/Application.cpp
Expand Up @@ -4183,6 +4183,12 @@ void CApplication::StopPlaying()
}
}

void CApplication::ResetSystemIdleTimer()
{
// reset system idle timer
m_idleTimer.StartZero();
}

void CApplication::ResetScreenSaver()
{
// reset our timers
Expand Down
1 change: 1 addition & 0 deletions xbmc/Application.h
Expand Up @@ -172,6 +172,7 @@ class CApplication : public CXBApplicationEx, public IPlayerCallback, public IMs
int GetSubtitleDelay() const;
int GetAudioDelay() const;
void SetPlaySpeed(int iSpeed);
void ResetSystemIdleTimer();
void ResetScreenSaverTimer();
void StopScreenSaverTimer();
// Wakes up from the screensaver and / or DPMS. Returns true if woken up.
Expand Down
1 change: 1 addition & 0 deletions xbmc/interfaces/json-rpc/InputOperations.cpp
Expand Up @@ -46,6 +46,7 @@ JSON_STATUS CInputOperations::sendAction(int actionID)
{
if(!handleScreenSaver())
{
g_application.ResetSystemIdleTimer();
g_audioManager.PlayActionSound(actionID);
g_application.getApplicationMessenger().SendAction(CAction(actionID), WINDOW_INVALID, false);
}
Expand Down

0 comments on commit 95aeff2

Please sign in to comment.