diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-19 17:07:43 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-19 17:07:43 +0200 |
commit | e1bfcaeafa05079eb3b52182366056eada63ef1e (patch) | |
tree | 77d20c4c02844de5600353600b41562ec4b481eb /minilibx-linux/mlx_screen_size.c | |
parent | changes (diff) | |
download | 42-cub3d-e1bfcaeafa05079eb3b52182366056eada63ef1e.tar.gz 42-cub3d-e1bfcaeafa05079eb3b52182366056eada63ef1e.tar.bz2 42-cub3d-e1bfcaeafa05079eb3b52182366056eada63ef1e.tar.xz 42-cub3d-e1bfcaeafa05079eb3b52182366056eada63ef1e.tar.zst 42-cub3d-e1bfcaeafa05079eb3b52182366056eada63ef1e.zip |
Minilibx update
Diffstat (limited to '')
-rw-r--r-- | minilibx-linux/mlx_screen_size.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/minilibx-linux/mlx_screen_size.c b/minilibx-linux/mlx_screen_size.c new file mode 100644 index 0000000..835730d --- /dev/null +++ b/minilibx-linux/mlx_screen_size.c @@ -0,0 +1,13 @@ +#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; +} |