17 #include <TargetConditionals.h>
22 #import <AppKit/AppKit.h>
23 #import <Foundation/Foundation.h>
28 CGFloat scale_factor = 1.0f;
30 NSArray *screens = [NSScreen screens];
32 if ([screens[display_index] respondsToSelector:
@selector(backingScaleFactor)]) {
33 scale_factor = [screens[display_index] backingScaleFactor];
CGFloat get_scale_factor(int display_index)