mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
NowPlaying.dll: Fixed negative duration with Winamp
This commit is contained in:
parent
62f80d9556
commit
1d747d79f1
@ -165,8 +165,10 @@ void CPlayerWinamp::UpdateData()
|
|||||||
|
|
||||||
if (!m_PlayingStream)
|
if (!m_PlayingStream)
|
||||||
{
|
{
|
||||||
|
int duration = SendMessage(m_Window, WM_WA_IPC, 1, IPC_GETOUTPUTTIME);
|
||||||
|
m_Duration = (duration != -1) ? duration : 0;
|
||||||
|
|
||||||
m_Rating = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETRATING);
|
m_Rating = SendMessage(m_Window, WM_WA_IPC, 0, IPC_GETRATING);
|
||||||
m_Duration = SendMessage(m_Window, WM_WA_IPC, 1, IPC_GETOUTPUTTIME);
|
|
||||||
m_Shuffle = (bool)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_SHUFFLE);
|
m_Shuffle = (bool)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_SHUFFLE);
|
||||||
m_Repeat = (bool)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_REPEAT);
|
m_Repeat = (bool)SendMessage(m_Window, WM_WA_IPC, 0, IPC_GET_REPEAT);
|
||||||
|
|
||||||
@ -266,6 +268,12 @@ void CPlayerWinamp::UpdateData()
|
|||||||
}
|
}
|
||||||
else if (!m_PlayingStream)
|
else if (!m_PlayingStream)
|
||||||
{
|
{
|
||||||
|
if (m_Duration == 0)
|
||||||
|
{
|
||||||
|
int duration = SendMessage(m_Window, WM_WA_IPC, 1, IPC_GETOUTPUTTIME);
|
||||||
|
m_Duration = (duration != -1) ? duration : 0;
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user