mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 06:30:55 +00:00
Move the Vsync logic from VTRenderer into a VsyncSource
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#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);
|
||||
|
||||
private:
|
||||
static
|
||||
CVReturn
|
||||
displayLinkOutputCallback(
|
||||
CVDisplayLinkRef,
|
||||
const CVTimeStamp* now,
|
||||
const CVTimeStamp* /* vsyncTime */,
|
||||
CVOptionFlags,
|
||||
CVOptionFlags*,
|
||||
void *displayLinkContext);
|
||||
|
||||
Pacer* m_Pacer;
|
||||
CVDisplayLinkRef m_DisplayLink;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user