mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
MPVOpenGLLayer called fatalError() when CGLChoosePixelFormat failed for both the 10-bit and 8-bit (kCGLPFAAccelerated) formats, killing the app at launch on machines without a usable GPU such as virtual machines. Add a non-accelerated software pixel format as a last resort and make the whole OpenGL init path failable: createPixelFormat/createContext return nil (with an error log) instead of aborting, MPVOpenGLLayer.init becomes init?, and MPVOGLView holds an optional layer, throwing openGLSetupFailed from setup(with:) when OpenGL is unavailable. That error is already handled by MPVBackend.setupMPVAsync, so the app now launches cleanly and only logs that video playback is unavailable.