al_get_monitor_dpi(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– al_get_monitor_dpi β€” the Allegro 5 API, bestie edition πŸ’–

okay so you're deep in the Allegro 5 API and you need to know how crispy your monitor is. this is that page. it's in the al_get_monitor_dpi(3alleg5) manual, and honestly? she's short and she's iconic. let's get into it 🫢


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

int al_get_monitor_dpi(int adapter)

that's it. one include, one function, no drama πŸ’…


🌸 DESCRIPTION 🌸

Get the dots per inch of a monitor attached to the display adapter.

that's the whole vibe β€” you hand it an adapter, it hands you back the DPI. no cap, that's genuinely all she does. lowkey obsessed with how simple this is 😭


πŸŽ€ SINCE πŸŽ€

5.2.5

(so if you're on anything older, this function said "not me, i don't exist yet" πŸ™ˆ)


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie! this came to you straight from the Allegro reference manual, filed under al_get_monitor_dpi(3alleg5). go forth and render at the correct pixel density πŸ‘‘πŸ’–

πŸ“¦ where this page comes from