How can I get the current screen/window depth ?

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
User avatar
TsT
Party member
Posts: 161
Joined: Thu Sep 25, 2008 7:04 pm
Location: France
Contact:

How can I get the current screen/window depth ?

Post by TsT »

I'm searching about how can I get the current love window size.

I saw
getModes() http://love2d.org/docs/love_graphics_getModes_1.html
and
setMode(...) http://love2d.org/docs/love_graphics_setMode_1.html

But i'm search about something like
getMode()
or getCurrentMode()

to get the width/height of the current window.

Thanks
My projects current projects : dragoon-framework (includes lua-newmodule, lua-provide, lovemodular, , classcommons2, and more ...)
surtic
Citizen
Posts: 74
Joined: Sat Jul 12, 2008 12:18 am

Re: How can I get the current screen/window depth ?

Post by surtic »

Try using:

Code: Select all

screen_width = love.graphics.getWidth()
screen_height = love.graphics.getHeight()
User avatar
TsT
Party member
Posts: 161
Joined: Thu Sep 25, 2008 7:04 pm
Location: France
Contact:

Re: How can I get the current screen/window depth ?

Post by TsT »

Oh thanks a lot !
I was not seen it...
Sorry.
My projects current projects : dragoon-framework (includes lua-newmodule, lua-provide, lovemodular, , classcommons2, and more ...)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests