diff options
author | Eugene Mutavchi <emutavchi@productengine.com> | 2010-03-05 21:36:41 +0200 |
---|---|---|
committer | Eugene Mutavchi <emutavchi@productengine.com> | 2010-03-05 21:36:41 +0200 |
commit | 48fd4c8d14172ab9780d88bf204d1e4e56f2004e (patch) | |
tree | 845586ccfd49e52fc8f0099ecc5d550ce7f13edf /indra/llwindow/llwindowmacosx-objc.mm | |
parent | a174a4ff3db22a40fe0259dab260321b20108fb7 (diff) |
Working on major bug EXT-4820([NUX] Viewer dimensions on first-run) - moved LLDisplayInfo to llwindow, implemented getting the width/height of screen for mac os and linux.
--HG--
branch : product-engine
Diffstat (limited to 'indra/llwindow/llwindowmacosx-objc.mm')
-rw-r--r-- | indra/llwindow/llwindowmacosx-objc.mm | 9 |
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]; +} + |