pacman/scaling-lib/Scaling.mm
2021-09-10 14:32:46 +02:00

15 lines
No EOL
346 B
Text

/*
This is an Objective C file to detect the window's
resolution scale on Apple platforms.
It is not a C++ file and is not part of this course!
*/
#import "AppKit/NSWindow.h"
#include "Scaling.hpp"
namespace pacman {
double scaling_factor_for_window(sf::WindowHandle handle) {
return [ reinterpret_cast<id>(handle) backingScaleFactor];
}
}