diff options
author | wm4 <wm4@nowhere> | 2015-12-06 19:20:23 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-12-06 19:20:23 +0100 |
commit | 159eb3f962b845c861b5f10da35fcc12e1e6cb15 (patch) | |
tree | a57cb36cd84849dc3031e06a6876cf9c22f22476 /video | |
parent | 9db50c6760758089a013983f0fbf93ebde53dbc7 (diff) | |
download | mpv-159eb3f962b845c861b5f10da35fcc12e1e6cb15.tar.bz2 mpv-159eb3f962b845c861b5f10da35fcc12e1e6cb15.tar.xz |
win32: add option to set VO MMCSS profile
This was requested.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/w32_common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 217359a7b1..025b744838 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -1327,7 +1327,11 @@ int vo_w32_init(struct vo *vo) // While the UI runs in its own thread, the thread in which this function // runs in will be the renderer thread. Apply magic MMCSS cargo-cult, // which might stop Windows from throttling clock rate and so on. - w32->avrt_handle = AvSetMmThreadCharacteristicsW(L"Playback", &(DWORD){0}); + if (vo->opts->mmcss_profile[0]) { + wchar_t *profile = mp_from_utf8(NULL, vo->opts->mmcss_profile); + w32->avrt_handle = AvSetMmThreadCharacteristicsW(profile, &(DWORD){0}); + talloc_free(profile); + } return 1; fail: |