clandrew / wdrp

Discord Rich Presence Winamp plugin
MIT License
107 stars 14 forks source link

Terminate Discord RPC connection when Winamp closing #17

Open derekgates opened 4 years ago

derekgates commented 4 years ago

Need to double check that the Discord connection/RPC is being closed when Winamp is shutting down.

I noticed I closed Winamp today and the status in Discord stuck around.

wa_ipc.h:

#define IPC_ISFULLSTOP 400
/* (requires winamp 2.7+ I think)
** int ret=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISFULLSTOP);
** This is useful for when you're an output plugin and you want to see if the stop/close
** happening is a full stop or if you are just between tracks. This returns non zero if
** it is a full stop or zero if it is just a new track.
** benski> i think it's actually the other way around - 
**         !0 for EOF and 0 for user pressing stop
*/