Skip to content

Commit

Permalink
OpenGL: Avoid race on minSwapTimeMs
Browse files Browse the repository at this point in the history
  • Loading branch information
reuk committed Jan 27, 2022
1 parent 7650a96 commit e751a5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/juce_opengl/native/juce_OpenGL_osx.h
Expand Up @@ -248,7 +248,8 @@ class OpenGLContext::NativeContext
NSOpenGLView* view = nil;
ReferenceCountedObjectPtr<ReferenceCountedObject> viewAttachment;
double lastSwapTime = 0;
int minSwapTimeMs = 0, underrunCounter = 0, numFramesPerSwap = 0;
std::atomic<int> minSwapTimeMs { 0 };
int underrunCounter = 0, numFramesPerSwap = 0;
double videoRefreshPeriodS = 1.0 / 60.0;

//==============================================================================
Expand Down

0 comments on commit e751a5e

Please sign in to comment.