Difference between revisions of "Lua:getScreenDPI"

From Cheat Engine
Jump to navigation Jump to search
(Created page with "<p> <b>getScreenDPI()</b>: Returns the screen DPI </p> <pre> print(getScreenDPI()) </pre>")
 
m (Syntax Highlighting.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<p>
+
[[Category:Lua]]
<b>getScreenDPI()</b>: Returns the screen DPI
+
{{CodeBox|'''function''' getScreenDPI() ''':''' integer}}
</p>
+
 
<pre>
+
Returns the Dots/Pixels Per Inch of the screen.
print(getScreenDPI())
+
 
</pre>
+
===Function Parameters===
 +
This function has no parameters.
 +
 
 +
===Returns===
 +
integer — The screen DPI value.
 +
 
 +
===Examples===
 +
<syntaxhighlight lang="lua" line>
 +
local dpi = getScreenDPI()
 +
print("Screen DPI: " .. dpi)
 +
</syntaxhighlight>
 +
 
 +
{{LuaSeeAlso}}

Latest revision as of 20:20, 25 June 2026

<> Lua API Reference

function getScreenDPI() : integer

Returns the Dots/Pixels Per Inch of the screen.

Function Parameters[edit]

This function has no parameters.

Returns[edit]

integer — The screen DPI value.

Examples[edit]

1 local dpi = getScreenDPI()
2 print("Screen DPI: " .. dpi)

Main Pages

Core Lua documentation entry points

Lua
Script Engine