Add Windows SystemMediaTransportControls support for MSVC

Co-authored-by: jonaski <10343810+jonaski@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-26 18:25:59 +00:00
committed by Jonas Kvinge
parent f25cdb3431
commit f77e92d634
4 changed files with 315 additions and 1 deletions

View File

@@ -93,6 +93,10 @@
# include "discord/richpresence.h"
#endif
#ifdef _MSC_VER
# include "core/windowsmediacontroller.h"
#endif
#include "core/iconloader.h"
#include "core/commandlineoptions.h"
#include "core/networkproxyfactory.h"
@@ -365,6 +369,11 @@ int main(int argc, char *argv[]) {
#endif
options);
#ifdef _MSC_VER
// Initialize Windows Media Transport Controls
WindowsMediaController windows_media_controller(reinterpret_cast<HWND>(w.winId()), app.player(), app.playlist_manager(), app.current_albumcover_loader());
#endif
#ifdef Q_OS_MACOS
mac::EnableFullScreen(w);
#endif // Q_OS_MACOS