{{newin|[[0.9.0]]|090|type=function}}
Gets the width and height of the desktop.
== Function ==
=== Synopsis ===
<source lang="lua">
width, height = love.window.getDesktopDimensions( display )
</source>
=== Arguments ===
{{param|number|display (1)|The index of the display, if multiple monitors are available.}}
=== Returns ===
{{param|number|width|The width of the desktop.}}
{{param|number|height|The height of the desktop.}}
== Examples ==
=== Show the resolution of the monitor the window is currently in ===
<source lang="lua">
function love.draw()
    local _, _, flags = love.window.getMode()

    -- The window's flags contain the index of the monitor it's currently in.
    local width, height = love.window.getDesktopDimensions(flags.display)

    love.graphics.print(("display %d: %d x %d"):format(flags.display, width, height), 4, 10)
end
</source>

== See Also ==
* [[parent::love.window]]
[[Category:Functions]]
{{#set:Description=Gets the width and height of the desktop.}}
== Other Languages ==
{{i18n|love.window.getDesktopDimensions}}