Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Game programming

screen size and aspect ratio  [SOLVED]

All about the StoneScript

screen size and aspect ratio

Postby freezer » 05 Jul 2012, 16:05

i'm in the editor and i'm logging the screen size and aspect ration, but no matter how i change the display, the size and aspect is always the same...?
freezer
Gold Boarder
Gold Boarder
 
Posts: 216

Re: screen size and aspect ratio  [SOLVED]

Postby freezer » 05 Jul 2012, 16:23

doh,

i was sent the wrong functions (i think)...

Code: Select all
    local nWidth, nHeight = system.getCurrentScreenResolution ( )
    local aspect = system.getCurrentScreenPixelAspectRatio ( )


these seem better ;)

Code: Select all
    local as = application.getCurrentUserViewportAspectRatio()
    local h = application.getCurrentUserViewportHeight()
    local w = application.getCurrentUserViewportWidth()
freezer
Gold Boarder
Gold Boarder
 
Posts: 216


Return to Game programming