Allow Pacer to wait for frames up until a few ms before v-sync for better smoothness and lower latency

This commit is contained in:
Cameron Gutman
2018-08-20 17:53:35 -07:00
parent d6e7173af0
commit 6b395c816f
8 changed files with 49 additions and 14 deletions
@@ -9,7 +9,7 @@ public:
virtual ~NullThreadedVsyncSource();
virtual bool initialize(SDL_Window* window);
virtual bool initialize(SDL_Window* window, int displayFps);
private:
static int vsyncThread(void* context);
@@ -17,4 +17,5 @@ private:
Pacer* m_Pacer;
SDL_Thread* m_Thread;
SDL_atomic_t m_Stopping;
int m_DisplayFps;
};