Files
winamp-mpris/gen_httpSrv_systray/title.cpp
ergosteur 22492dbee9 Implement XDG compliance, logging, and improved 401 error handling
- Install to ~/.local/bin/winamp-mpris
- Use ~/.local/state/winamp-mpris/bridge.log for logging
- Use $XDG_RUNTIME_DIR/winamp-mpris.pid for PID management
- Add detailed user notification for 401 Unauthorized errors
- Add install.sh for automated, standard-compliant setup
- Include Winamp Web Interface source code and installer in repository
2026-04-08 18:29:40 -04:00

33 lines
808 B
C++

#include <windows.h>
#include <winsock.h>
#include "main.h"
extern HINSTANCE inst;
extern HWND hwnd;
extern char host[255], username[20], password[20], title[255];
extern int port, default_action, update_delay;
extern char szAppName[], AboutText[];
extern HWND ConfigWnd, VolumeWnd;
// --------------------------------------------------------------------------------
// Thread to update title in systray tooltip
DWORD WINAPI TitleThread(LPVOID param)
{
while(true)
{
MakeRequest(host,port,"/smalltitle",false,false,true);
if (StrComp(title,""))
wsprintf(title,"%s",szAppName);
systray_modify(hwnd,1030,LoadIcon(inst, MAKEINTRESOURCE(GetIconID())),title);
//MessageBox(hwnd,title,"Title",MB_OK | MB_TOPMOST);
Sleep(update_delay*1000);
}
return true;
}