summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx-objc.mm
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowmacosx-objc.mm')
-rw-r--r--indra/llwindow/llwindowmacosx-objc.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index 59b25e1726..6eca24ec1d 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -116,3 +116,12 @@ OSErr setImageCursor(CursorRef ref)
return noErr;
}
+void getScreenSize(int* width, int* height)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ NSRect screen_rect = [[NSScreen mainScreen] frame];
+ if (width) *width = (int)(screen_rect.size.width);
+ if (height) *height = (int)(screen_rect.size.height);
+ [pool release];
+}
+