How to know if a standalone is running on Retina display?

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

How to know if a standalone is running on Retina display?

Post by Mag » Tue Apr 02, 2013 11:38 am

Under iOS it's easy, but I can't find this information on documentation about OS X.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: How to know if a standalone is running on Retina display

Post by shaosean » Tue Apr 02, 2013 1:04 pm

You would need an external written.. This should help you with what you need to know about the underlying code for the external..

http://lists.apple.com/archives/carbon- ... 00008.html

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: How to know if a standalone is running on Retina display

Post by Mag » Tue Apr 02, 2013 1:19 pm

Wow! I didn't thought a such complicated thing... maybe if it possible to infer from things like the size of a button or other?

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: How to know if a standalone is running on Retina display

Post by Mag » Mon May 06, 2013 1:00 am

News about this topic?

PS
Sounds strange that there is not a way for LiveCode to know if the display on OS X is retina or not... :shock:

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: How to know if a standalone is running on Retina display

Post by sturgis » Mon May 06, 2013 8:08 am

I don't have a machine with retina to test on, but if you get the screenrect does that give you the information you need?

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: How to know if a standalone is running on Retina display

Post by Mag » Thu May 09, 2013 2:42 pm

Thanks. This could be an interesting way, but this could not be so reliable, what if the user has an external display with this resolution for example?

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: How to know if a standalone is running on Retina display

Post by sturgis » Thu May 09, 2013 3:03 pm

Hmm I guess it depends. If you just want to use resolution to determine how to draw the screen does it matter?

Of course if the second screen is being used as an additional monitor rather than the only monitor "the screenrects" gives a cr delimited list of both monitors, primary display first I believe.

Hard for me to know how to deal with it without the hardware unfortunately so my apologies if i'm way off base.

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: How to know if a standalone is running on Retina display

Post by Mag » Thu May 09, 2013 3:15 pm

Thank you I really appreciate your help, maybe it could lead to a solution.

I wrote wrong, what I mean is that for example the primary monitor of a desktop Mac could have that resolution and not be retina...

I need this info primarely to know if I need to use standard images or retina ones (@2x).

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: How to know if a standalone is running on Retina display

Post by shaosean » Sat Jul 27, 2013 6:13 am

If someone has a Mac with a Retina display and is willing to do a quick test, I think I may have an external that will let you know if the window is being drawn scaled up or not..
< support AT shaosean DOT tk >

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: How to know if a standalone is running on Retina display

Post by Simon » Sat Jul 27, 2013 6:29 am

Isn't this the news from the newsletter:
http://newsletters.livecode.com/july/is ... mi=9747099
The aim of this project is to take away the need to LiveCode developers to do extra work when creating an app that is required to run on devices with different screen densities
LiveCode can now display a stack at any scale on Mac and iOS!
Admittedly, probably not as fast as shaosean can release it.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: How to know if a standalone is running on Retina display

Post by shaosean » Sat Jul 27, 2013 6:35 am

Well, this is just to test if the window is being displayed scaled or not.. There are other features to allow for drawing an image at the right scale, but would require using NSImages as they have automatic handling of using the proper external file (or at least that's what the docs say ;-) )

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: How to know if a standalone is running on Retina display

Post by shaosean » Tue Aug 06, 2013 5:40 pm

Apparently no-one is developing on a Retina display..

Post Reply

Return to “Mac OS”