feat(windows): SMTC integration

This commit is contained in:
2026-08-03 20:57:33 +08:00
parent 7164a5a299
commit 383088054c
8 changed files with 546 additions and 11 deletions
+17
View File
@@ -13,8 +13,25 @@
#include <QTranslator>
#include <QDir>
#ifdef Q_OS_WIN
#include <windows.h>
#endif
int main(int argc, char *argv[])
{
#ifdef Q_OS_WIN
typedef HRESULT(WINAPI *SetCurrentProcessExplicitAppUserModelIDProc)(PCWSTR);
HMODULE shell32 = LoadLibraryW(L"shell32.dll");
if (shell32) {
auto proc = reinterpret_cast<SetCurrentProcessExplicitAppUserModelIDProc>(
GetProcAddress(shell32, "SetCurrentProcessExplicitAppUserModelID"));
if (proc) {
proc(L"net.blumia.pineapple-music");
}
FreeLibrary(shell32);
}
#endif
QApplication a(argc, argv);
QTranslator translator;