From a912079eac5fad87aa8a56507232ecbc9b6a5dba Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 22 Jun 2022 00:18:27 +0200 Subject: [PATCH] Disable MPV drawing in simulator --- Model/Player/Backends/MPVClient.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Model/Player/Backends/MPVClient.swift b/Model/Player/Backends/MPVClient.swift index 16788a29..560dd3f0 100644 --- a/Model/Player/Backends/MPVClient.swift +++ b/Model/Player/Backends/MPVClient.swift @@ -340,6 +340,11 @@ final class MPVClient: ObservableObject { } private func glUpdate(_ ctx: UnsafeMutableRawPointer?) { + #if targetEnvironment(simulator) + // performance of drawing in simulator is poor and buggy, disable it + return + #endif + let glView = unsafeBitCast(ctx, to: MPVOGLView.self) guard glView.needsDrawing else {