Add a VsyncSource for renderers that already block for V-sync

This commit is contained in:
Cameron Gutman
2018-08-20 17:24:47 -07:00
parent 1a60484abc
commit d6e7173af0
3 changed files with 67 additions and 2 deletions
@@ -0,0 +1,20 @@
#pragma once
#include "pacer.h"
class NullThreadedVsyncSource : public IVsyncSource
{
public:
NullThreadedVsyncSource(Pacer* pacer);
virtual ~NullThreadedVsyncSource();
virtual bool initialize(SDL_Window* window);
private:
static int vsyncThread(void* context);
Pacer* m_Pacer;
SDL_Thread* m_Thread;
SDL_atomic_t m_Stopping;
};