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.
-
Happy5354
- Prole
- Posts: 6
- Joined: Thu Jan 22, 2015 3:32 am
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
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
Post
by Happy5354 »
Yes it works!
Thanks very much !
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 6 guests