summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/opengl/w32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/opengl/w32.c b/video/out/opengl/w32.c
index 8365a3933c..fc789619c8 100644
--- a/video/out/opengl/w32.c
+++ b/video/out/opengl/w32.c
@@ -262,6 +262,8 @@ static int w32_init(struct MPGLContext *ctx, int flags)
current_w32_context = w32_ctx;
wglMakeCurrent(w32_ctx->hdc, w32_ctx->context);
+ if (w32_ctx->pDwmEnableMMCSS)
+ w32_ctx->pDwmEnableMMCSS(TRUE);
return 0;
fail:
@@ -295,6 +297,9 @@ static void w32_uninit(MPGLContext *ctx)
wglMakeCurrent(w32_ctx->hdc, 0);
vo_w32_run_on_thread(ctx->vo, destroy_gl, ctx);
+ if (w32_ctx->pDwmEnableMMCSS)
+ w32_ctx->pDwmEnableMMCSS(FALSE);
+
if (w32_ctx->dwmapi_dll)
FreeLibrary(w32_ctx->dwmapi_dll);
w32_ctx->dwmapi_dll = NULL;