mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
NowPlayingPlugin: Added SetPosition and Pause bangs plus some tweaks.
This commit is contained in:
@ -527,6 +527,20 @@ void CPlayerWMP::UpdateData()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Pause
|
||||
**
|
||||
** Handles the Pause bang.
|
||||
**
|
||||
*/
|
||||
void CPlayerWMP::Pause()
|
||||
{
|
||||
if (m_IPlayer)
|
||||
{
|
||||
m_IControls->pause();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Play
|
||||
**
|
||||
@ -549,20 +563,7 @@ void CPlayerWMP::Play()
|
||||
*/
|
||||
void CPlayerWMP::PlayPause()
|
||||
{
|
||||
if (m_IPlayer)
|
||||
{
|
||||
WMPPlayState state;
|
||||
m_IPlayer->get_playState(&state);
|
||||
|
||||
if (state == wmppsPlaying)
|
||||
{
|
||||
m_IControls->pause();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_IControls->play();
|
||||
}
|
||||
}
|
||||
(m_State == PLAYER_PLAYING) ? Pause() : Play();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -608,6 +609,20 @@ void CPlayerWMP::Previous()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** SetPosition
|
||||
**
|
||||
** Handles the SetPosition bang.
|
||||
**
|
||||
*/
|
||||
void CPlayerWMP::SetPosition(int position)
|
||||
{
|
||||
if (m_IPlayer)
|
||||
{
|
||||
m_IControls->put_currentPosition((double)position);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** SetRating
|
||||
**
|
||||
@ -671,18 +686,6 @@ void CPlayerWMP::SetVolume(int volume)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** ChangeVolume
|
||||
**
|
||||
** Handles the ChangeVolume bang.
|
||||
**
|
||||
*/
|
||||
void CPlayerWMP::ChangeVolume(int volume)
|
||||
{
|
||||
volume += m_Volume;
|
||||
SetVolume(volume);
|
||||
}
|
||||
|
||||
/*
|
||||
** ClosePlayer
|
||||
**
|
||||
|
Reference in New Issue
Block a user