Skip to content

getResolution

Gets the current screen resolution.

Syntax

lua
Ham.getResolution()

Returns

  • integer - Screen width in pixels
  • integer - Screen height in pixels

Example

lua
local width, height = Ham.getResolution()
print("Resolution: " .. width .. "x" .. height)

Released under the ISC License.