Page 1 of 1

Get Resolutions does work ?

Posted: Sun Feb 08, 2015 7:59 pm
by Happy5354
Hey, I check on Google how I can check all the resolutions and I tried this:

Code: Select all

modes = love.window.getFullscreenModes(1)
print(modes[1])
Then it just prints: "table: 0x24cb0b70" multiple times with random numbers each times.

Thanks for the help!

Re: Get Resolutions does work ?

Posted: Sun Feb 08, 2015 8:16 pm
by Joe Black
you print the first index of modes that is a table, lua use pointer so you print (I think) the address of the table 'modes[1]'.

you must print modes[1].height or modes[1].width as below

Re: Get Resolutions does work ?

Posted: Wed Feb 11, 2015 2:42 am
by Happy5354
Yes it works!
Thanks very much !