mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-10 13:44:17 +00:00
Use DWM MMCSS for D3D11VA like DXVA2 does
This commit is contained in:
parent
69af991772
commit
ad5581c620
1 changed files with 6 additions and 0 deletions
|
@ -11,6 +11,8 @@
|
||||||
#include <SDL_syswm.h>
|
#include <SDL_syswm.h>
|
||||||
#include <VersionHelpers.h>
|
#include <VersionHelpers.h>
|
||||||
|
|
||||||
|
#include <dwmapi.h>
|
||||||
|
|
||||||
#define SAFE_COM_RELEASE(x) if (x) { (x)->Release(); }
|
#define SAFE_COM_RELEASE(x) if (x) { (x)->Release(); }
|
||||||
|
|
||||||
typedef struct _VERTEX
|
typedef struct _VERTEX
|
||||||
|
@ -95,10 +97,14 @@ D3D11VARenderer::D3D11VARenderer()
|
||||||
RtlZeroMemory(m_VideoTextureResourceViews, sizeof(m_VideoTextureResourceViews));
|
RtlZeroMemory(m_VideoTextureResourceViews, sizeof(m_VideoTextureResourceViews));
|
||||||
|
|
||||||
m_ContextLock = SDL_CreateMutex();
|
m_ContextLock = SDL_CreateMutex();
|
||||||
|
|
||||||
|
DwmEnableMMCSS(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
D3D11VARenderer::~D3D11VARenderer()
|
D3D11VARenderer::~D3D11VARenderer()
|
||||||
{
|
{
|
||||||
|
DwmEnableMMCSS(FALSE);
|
||||||
|
|
||||||
SDL_DestroyMutex(m_ContextLock);
|
SDL_DestroyMutex(m_ContextLock);
|
||||||
|
|
||||||
SAFE_COM_RELEASE(m_VideoVertexBuffer);
|
SAFE_COM_RELEASE(m_VideoVertexBuffer);
|
||||||
|
|
Loading…
Reference in a new issue