Get Resolutions does work ?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Happy5354
Prole
Posts: 6
Joined: Thu Jan 22, 2015 3:32 am

Get Resolutions does work ?

Post 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!
Joe Black
Prole
Posts: 39
Joined: Wed Jan 21, 2015 1:57 pm

Re: Get Resolutions does work ?

Post 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
Attachments
resolution.love
(330 Bytes) Downloaded 101 times
Happy5354
Prole
Posts: 6
Joined: Thu Jan 22, 2015 3:32 am

Re: Get Resolutions does work ?

Post by Happy5354 »

Yes it works!
Thanks very much !
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests