Retina or not ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Retina or not ?

Michel Bany
Dear friends,

Does anybody know what I should write to determine programmatically if my Macbook Pro is retina or not ?
I am using 8.0.1.

Thanks in advance,
Michel


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Retina or not ?

Maarten Mostert

I use the ioreg command to extract the mac's serial number but in your case doing something like might help

 

ExternalProcess new
shOne: 'ioreg -lw0 | grep \"EDID\" | sed "/[^<]*</s///" | xxd -p -r | strings -6'.

 

gives: 'LTN154BT08
Color LCD
4C31500ABAFNA

 

on my non retina macbook.

 

It is to suppose to give you a string with LP if you have retina display.

 

http://apple.stackexchange.com/questions/61087/what-terminal-command-shows-the-type-of-display-that-i-have-on-my-macbook-pro

 

 

@+Maarten,

 

 

 


> "Michel Bany" <[hidden email]> |

> Dear friends,


>
> Does anybody know what I should write to determine programmatically if my Macbook
> Pro is retina or not ?
> I am using 8.0.1.
>
> Thanks in advance,
> Michel
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Retina or not ?

Antony Blakey-5
In reply to this post by Michel Bany
You probably shouldn't test your machine, but instead you should test a particular NSScreen. One machine can host simultaneous screens, each of which may have different backing scales. NSWindows can span screens, so the situation is a lot more subtle than you might hope.

https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/APIs/APIs.html

> On 28 Jun 2015, at 18:49, Michel Bany <[hidden email]> wrote:
>
> Dear friends,
>
> Does anybody know what I should write to determine programmatically if my Macbook Pro is retina or not ?
> I am using 8.0.1.
>
> Thanks in advance,
> Michel
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

Antony Blakey
--------------------------
Ph: +61 438 840 787

Borrow money from pessimists - they don't expect it back.
  -- Steven Wright




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Retina or not ?

Michel Bany
In reply to this post by Maarten Mostert
Thanks Maarten, your trick is working for me.

Sent from my red iPhone 6S plus

On Sun, Jun 28, 2015 at 12:07 PM, <[hidden email]> wrote:

I use the ioreg command to extract the mac's serial number but in your case doing something like might help

 

ExternalProcess new
shOne: 'ioreg -lw0 | grep \"EDID\" | sed "/[^<]*</s///" | xxd -p -r | strings -6'.

 

gives: 'LTN154BT08
Color LCD
4C31500ABAFNA

 

on my non retina macbook.

 

It is to suppose to give you a string with LP if you have retina display.

 

http://apple.stackexchange.com/questions/61087/what-terminal-command-shows-the-type-of-display-that-i-have-on-my-macbook-pro

 

 

@+Maarten,

 

 

 


> "Michel Bany" <[hidden email]> |

> Dear friends,
>
> Does anybody know what I should write to determine programmatically if my Macbook
> Pro is retina or not ?
> I am using 8.0.1.
>
> Thanks in advance,
> Michel
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Retina or not ?

Steven Kelly
In reply to this post by Antony Blakey-5
Re: [vwnc] Retina or not ?
Yep, it's a mess :). Interestingly, for some purposes it is better to test the whole system, rather than a particular screen. Our case was finding out whether Retina / HiDPI was in use, in which case we needed different code to avoid VW's bugs* in handling Retina / HiDPI. Even if only one screen was Retina, the bugs occurred on all screens.
 
All the best,
Steve
 
* The bug is seen as double-scaling of bitmaps calculated or cached via Pixmaps, because VW incorrectly scales bitmaps even when displaying them to an off-screen Pixmap. It shows up most clearly in the rounded ends of buttons and scrollbars in the old Mac OS X look.


From: [hidden email] on behalf of Antony Blakey
Sent: Sun 28/06/2015 13:50
To: Michel Bany
Cc: VisualWorks mailing list list
Subject: Re: [vwnc] Retina or not ?

You probably shouldn't test your machine, but instead you should test a particular NSScreen. One machine can host simultaneous screens, each of which may have different backing scales. NSWindows can span screens, so the situation is a lot more subtle than you might hope.

https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/APIs/APIs.html


> On 28 Jun 2015, at 18:49, Michel Bany <[hidden email]> wrote:
>
> Dear friends,
>
> Does anybody know what I should write to determine programmatically if my Macbook Pro is retina or not ?
> I am using 8.0.1.
>
> Thanks in advance,
> Michel
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

Antony Blakey
--------------------------
Ph: +61 438 840 787

Borrow money from pessimists - they don't expect it back.
  -- Steven Wright




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc