Browse Source

OpenGL: Avoid race on minSwapTimeMs

v6.1.6
reuk 3 years ago
parent
commit
e751a5edd7
No known key found for this signature in database GPG Key ID: FCB43929F012EE5C
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      modules/juce_opengl/native/juce_OpenGL_osx.h

+ 2
- 1
modules/juce_opengl/native/juce_OpenGL_osx.h View File

@@ -248,7 +248,8 @@ public:
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;
//==============================================================================


Loading…
Cancel
Save