summaryrefslogtreecommitdiff
path: root/dggui/nativewindow_cocoa.mm
diff options
context:
space:
mode:
Diffstat (limited to 'dggui/nativewindow_cocoa.mm')
-rw-r--r--dggui/nativewindow_cocoa.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/dggui/nativewindow_cocoa.mm b/dggui/nativewindow_cocoa.mm
index 3214f57..9484af7 100644
--- a/dggui/nativewindow_cocoa.mm
+++ b/dggui/nativewindow_cocoa.mm
@@ -609,6 +609,12 @@ std::pair<std::size_t, std::size_t> NativeWindowCocoa::getSize() const
}
}
+bool NativeWindowCocoa::isHiDPI()
+{
+ float dpi = [priv->window backingScaleFactor];
+ return dpi > 1.0f;
+}
+
void NativeWindowCocoa::move(int x, int y)
{
NSRect screen = [[NSScreen mainScreen] frame];