mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-22 16:08:45 +00:00
Add performance overlay for DXVA2 renderer
This commit is contained in:
25
app/streaming/video/overlaymanager.cpp
Normal file
25
app/streaming/video/overlaymanager.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "overlaymanager.h"
|
||||
|
||||
OverlayManager::OverlayManager()
|
||||
{
|
||||
memset(m_Overlays, 0, sizeof(m_Overlays));
|
||||
}
|
||||
|
||||
bool OverlayManager::isOverlayEnabled(OverlayManager::OverlayType type)
|
||||
{
|
||||
return m_Overlays[type].enabled;
|
||||
}
|
||||
|
||||
char* OverlayManager::getOverlayText(OverlayType type)
|
||||
{
|
||||
return m_Overlays[type].text;
|
||||
}
|
||||
|
||||
void OverlayManager::setOverlayState(OverlayManager::OverlayType type, bool enabled)
|
||||
{
|
||||
m_Overlays[type].enabled = enabled;
|
||||
if (!enabled) {
|
||||
// Set the text to empty string on disable
|
||||
m_Overlays[type].text[0] = 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user