mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-15 13:52:28 +00:00
31 lines
609 B
C++
31 lines
609 B
C++
#pragma once
|
|
|
|
#include <CoreVideo/CoreVideo.h>
|
|
|
|
#include "pacer.h"
|
|
|
|
class DisplayLinkVsyncSource : public IVsyncSource
|
|
{
|
|
public:
|
|
DisplayLinkVsyncSource(Pacer* pacer);
|
|
|
|
virtual ~DisplayLinkVsyncSource();
|
|
|
|
virtual bool initialize(SDL_Window* window, int displayFps);
|
|
|
|
private:
|
|
static
|
|
CVReturn
|
|
displayLinkOutputCallback(
|
|
CVDisplayLinkRef,
|
|
const CVTimeStamp* now,
|
|
const CVTimeStamp* /* vsyncTime */,
|
|
CVOptionFlags,
|
|
CVOptionFlags*,
|
|
void *displayLinkContext);
|
|
|
|
Pacer* m_Pacer;
|
|
CVDisplayLinkRef m_DisplayLink;
|
|
int m_DisplayFps;
|
|
};
|
|
|