diff --git a/src/platform/macos/av_video.m b/src/platform/macos/av_video.m index 3b58bff55f5..bb7723bb5c5 100644 --- a/src/platform/macos/av_video.m +++ b/src/platform/macos/av_video.m @@ -32,8 +32,7 @@ @implementation AVVideo } + (NSString *)getDisplayName:(CGDirectDisplayID)displayID { - NSScreen *screens = [NSScreen screens]; - for (NSScreen *screen in screens) { + for (NSScreen *screen in [NSScreen screens]) { if (screen.deviceDescription[@"NSScreenNumber"] == [NSNumber numberWithUnsignedInt:displayID]) { return screen.localizedName; }