mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-21 04:39:05 -05:00
Calling `devicePixelRatioF` from any thread but the main UI thread triggers thread-safety warnings at runtime on macOS, because Qt uses NSView calls to determine the value. NSView calls are only allowed to be made from the main thread on macOS, so instead the value is stored as a property of the OBSQTDisplay at initialization, to be retrieved from the preview object later. Static functions that do not have access to the preview object have the pixel ratio passed in their call signature.
277 KiB
277 KiB