love.window.getMode

Available since LÖVE 0.9.0
Moved from love.graphics.getMode.

Gets the display mode and properties of the window.

Function

Synopsis

width, height, flags = love.window.getMode( )

Arguments

None.

Returns

number width
Window width.
number height
Window height.
table flags
Table with the window properties:
boolean fullscreen
Fullscreen (true), or windowed (false).
FullscreenType fullscreentype
The type of fullscreen mode used.
number vsync
1 if the graphics framerate is synchronized with the monitor's refresh rate, 0 otherwise.
number msaa
The number of antialiasing samples used (0 if MSAA is disabled).
boolean resizable
True if the window is resizable in windowed mode, false otherwise.
boolean borderless
True if the window is borderless in windowed mode, false otherwise.
boolean centered
True if the window is centered in windowed mode, false otherwise.
number display
The index of the display the window is currently in, if multiple monitors are available.
number minwidth
The minimum width of the window, if it's resizable.
number minheight
The minimum height of the window, if it's resizable.
boolean highdpi Available since 0.9.1
True if high-dpi mode is allowed on Retina displays in OS X. Does nothing on non-Retina displays.


number refreshrate Available since 0.9.2
The refresh rate of the screen's current display mode, in Hz. May be 0 if the value can't be determined.
number x Available since 0.9.2
The x-coordinate of the window's position in its current display.
number y Available since 0.9.2
The y-coordinate of the window's position in its current display.


boolean srgb Available since 0.9.1 and removed in LÖVE 0.10.0
Removed in 0.10.0 (use love.graphics.isGammaCorrect instead). True if sRGB gamma correction is applied when drawing to the screen.


See Also

© 2006–2020 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.window.getMode