2021-07-07 09:33:22 +00:00
|
|
|
/*
|
|
|
|
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"
|
2021-07-08 08:17:05 +00:00
|
|
|
#include "Scaling.hpp"
|
2021-07-07 09:33:22 +00:00
|
|
|
|
2021-07-08 08:17:05 +00:00
|
|
|
namespace pacman {
|
|
|
|
|
2021-07-08 08:26:59 +00:00
|
|
|
double scaling_factor_for_window(sf::WindowHandle handle) {
|
2021-09-10 12:05:35 +00:00
|
|
|
return [ static_cast<id>(handle backingScaleFactor)];
|
2021-07-08 08:17:05 +00:00
|
|
|
}
|
|
|
|
|
2021-07-07 09:33:22 +00:00
|
|
|
}
|