Remove pointer

This commit is contained in:
Patricia Aas 2021-07-08 10:26:59 +02:00
parent 3966987e2a
commit 8082c69aff

View file

@ -4,16 +4,12 @@ resolution scale on Apple platforms.
It is not a C++ file and is not part of this course! It is not a C++ file and is not part of this course!
*/ */
#import "AppKit/NSWindow.h" #import "AppKit/NSWindow.h"
#include <cassert>
#include "Scaling.hpp" #include "Scaling.hpp"
namespace pacman { namespace pacman {
double scaling_factor_for_window(sf::WindowHandle) { double scaling_factor_for_window(sf::WindowHandle handle) {
NSWindow* window = static_cast<NSWindow*>(ptr); return [ (id) handle backingScaleFactor];
assert(window);
double d = [window backingScaleFactor];
return d;
} }
} }