Skip to main content

The "window_get_dpi" Function

Syntax#

window_get_dpi();
ArgumentTypeDescription
N/AN/ANo arguments

Description#

Returns the current window DPI as a scale multiplier of the base DPI setting. Result depends on the running platform. Desktop and mobile DPI multipliers are inverted, such that desktop platforms will generally scale up (values > 1.0), while mobile platforms will generally scale down (values < 1.0).

Example#

if (os_type == os_windows) {
if (window_get_dpi() < 1) {
draw_set_font(font_small);
} else {
draw_set_font(font_large);
}
}