summaryrefslogtreecommitdiff
path: root/plugins/Watrack/winampapi.pas
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2014-04-24 14:55:20 +0000
committerAlexey Kulakov <panda75@bk.ru>2014-04-24 14:55:20 +0000
commitc3a168743616db6606702db5ad0fecab4dfee3da (patch)
tree523ef1399093917f3565d769826ceecb7eb2ef6c /plugins/Watrack/winampapi.pas
parent90ad600cb38a04c9272a3599c72d6559c822b155 (diff)
Miranda API update
Watrack refactoring, API changes git-svn-id: http://svn.miranda-ng.org/main/trunk@9068 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Watrack/winampapi.pas')
-rw-r--r--plugins/Watrack/winampapi.pas15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/Watrack/winampapi.pas b/plugins/Watrack/winampapi.pas
index e53e88a247..0b61525027 100644
--- a/plugins/Watrack/winampapi.pas
+++ b/plugins/Watrack/winampapi.pas
@@ -99,16 +99,21 @@ function WinampGetStatus(wnd:HWND):integer;
begin
result:=SendMessage(wnd,WM_WA_IPC,0,IPC_ISPLAYING);
// 0 - stopped, 1 - playing
- if result>1 then
- result:=WAT_MES_PAUSED;
+ case result of
+ 0: result:=WAT_PLS_STOPPED;
+ 1: result:=WAT_PLS_PLAYING;
+ else
+ if result>1 then
+ result:=WAT_PLS_PAUSED;
+ end;
{
if result=0 then // !! only for remote media!
begin
result:=SendMessage(wnd,WM_WA_IPC,0,IPC_ISFULLSTOP);
if result<>0 then
- result:=WAT_MES_STOPPED
+ result:=WAT_PLS_STOPPED
else
- result:=WAT_MES_PLAYING;
+ result:=WAT_PLS_PLAYING;
end;
}
end;
@@ -193,7 +198,7 @@ begin
else if (lParam and WAT_OPT_CHANGES)<>0 then
begin
volume:=GetVolume(wnd);
- if status<>WAT_MES_STOPPED then
+ if status<>WAT_PLS_STOPPED then
time:=GetElapsedTime(wnd);
// wndtext:=WinampGetWindowText(wnd);
end