Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How to get actual (physical) screen resolution?
Started by MauMau Nov 14 2018 04:00 AM

- - - - -
2 replies to this topic
display screen resolution size pixels
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

MauMau

[GLOBAL: userInfoPane.html]
MauMau
  • Contributor

  • 109 posts
  • Corona SDK

Is there any way to retreive the actual (physical) screen resolution of the current device? No matter what I try, the simulator always returns an incorrect resolution which is smaller than the resolution of the selected hardware device.

 

I'd need to be able if the app is running on a low res or high res Android device (1080p or better).

 

 

 



[TOPIC: post.html]
#2

anaqim

[GLOBAL: userInfoPane.html]
anaqim
  • Contributor

  • 759 posts
  • Corona SDK

https://docs.coronalabs.com/api/library/display/index.html

 

if i am not mistaken, display.pixelWidth and display.pixelHeight should work.


  • roaminggamer likes this

[TOPIC: post.html]
#3

MauMau

[GLOBAL: userInfoPane.html]
MauMau
  • Contributor

  • 109 posts
  • Corona SDK

Works -thanks a lot! ^_^




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: display, screen, resolution, size, pixels