Revert "fix: sync imgui fps to stream fps to avoid it interferes with displaylink timings"
This reverts commit 5d1bed4d25.
This commit is contained in:
1 parent
b6c029df38
commit
34a115706e
2 files changed
+2
-6
No files matched your search
@@ -28,7 +28,6 @@ typedef void (^MetricsHandler)(int plotId, CFTimeInterval value);
|
|||||||
@property (nonatomic) BOOL enableGraphs;
|
@property (nonatomic) BOOL enableGraphs;
|
||||||
@property (nonatomic) float graphOpacity;
|
@property (nonatomic) float graphOpacity;
|
||||||
@property (nonatomic) BOOL imguiRunning;
|
@property (nonatomic) BOOL imguiRunning;
|
||||||
@property (nonatomic) int streamFps;
|
|
||||||
@property (nonatomic) MetricsHandler _Nonnull metricsHandler;
|
@property (nonatomic) MetricsHandler _Nonnull metricsHandler;
|
||||||
|
|
||||||
-(nonnull instancetype) initWithFrame:(CGRect)bounds
|
-(nonnull instancetype) initWithFrame:(CGRect)bounds
|
||||||
|
|||||||
@@ -42,9 +42,6 @@
|
|||||||
|
|
||||||
_plots = [ImGuiPlots sharedInstance].plots;
|
_plots = [ImGuiPlots sharedInstance].plots;
|
||||||
|
|
||||||
// Store stream FPS to synchronize MTKView
|
|
||||||
_streamFps = streamFps;
|
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +90,7 @@
|
|||||||
|
|
||||||
self.mtkView.device = self.device;
|
self.mtkView.device = self.device;
|
||||||
self.mtkView.delegate = self;
|
self.mtkView.delegate = self;
|
||||||
self.mtkView.preferredFramesPerSecond = _streamFps; // Synchronize with stream framerate
|
self.mtkView.preferredFramesPerSecond = 60; // ImGui overlay will always render at this rate
|
||||||
self.mtkView.opaque = NO;
|
self.mtkView.opaque = NO;
|
||||||
self.mtkView.enableSetNeedsDisplay = NO;
|
self.mtkView.enableSetNeedsDisplay = NO;
|
||||||
|
|
||||||
@@ -182,7 +179,7 @@
|
|||||||
#if TARGET_OS_SIMULATOR
|
#if TARGET_OS_SIMULATOR
|
||||||
[commandBuffer presentDrawable:view.currentDrawable];
|
[commandBuffer presentDrawable:view.currentDrawable];
|
||||||
#else
|
#else
|
||||||
[commandBuffer presentDrawable:view.currentDrawable afterMinimumDuration:1.0 / _streamFps];
|
[commandBuffer presentDrawable:view.currentDrawable afterMinimumDuration:1.0 / view.preferredFramesPerSecond];
|
||||||
#endif
|
#endif
|
||||||
[commandBuffer commit];
|
[commandBuffer commit];
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in new issue
Block a user