42_solong/minilibx-linux/mlx_screen_size.c
Camille Chauvet b2dfb505bd kekw
2022-12-22 17:56:11 +01:00

14 lines
288 B
C

#include "mlx_int.h"
int mlx_get_screen_size(void *mlx_ptr, int *sizex, int *sizey)
{
XWindowAttributes xwAttr;
Status ret;
t_xvar *xvar;
xvar = mlx_ptr;
ret = XGetWindowAttributes(xvar->display, xvar->root, &xwAttr);
(*sizex) = xwAttr.width;
(*sizey) = xwAttr.height;
}