From aef5fbe3d215672783bc9f998f622c40b5504c9f Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 23 Feb 2020 00:27:01 +0100 Subject: Preparing OS defines for later use --- Makefile | 1 + inc/cub3d_defines.h | 9 +++++++++ src/ft_init_winlx.c | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 91985bb..748d5e2 100644 --- a/Makefile +++ b/Makefile @@ -104,6 +104,7 @@ ifdef POWER endif #--------------------------------------------------------------------------------------------------# CDEFS = -DFT_SCR_SIZE=\"${SCR_SZE}\" +CDEFS += -DFT_OS=\"${OS}\" ifneq (${OS}, Darwin) CDEFS += -DFT_W_KEY=119 CDEFS += -DFT_A_KEY=97 diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index dd34fa7..c4be489 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -61,6 +61,15 @@ # define FT_SCR_SIZE "1920x1080" # endif +/* +** ====== OTHERS ====== +*/ + +# ifndef FT_OS +# define FT_OS "Darwin" +# endif + + /* ** ====== MAP ERROR MSG ====== */ diff --git a/src/ft_init_winlx.c b/src/ft_init_winlx.c index 6657408..cad5795 100644 --- a/src/ft_init_winlx.c +++ b/src/ft_init_winlx.c @@ -26,7 +26,7 @@ int clist->wlist->x_size, clist->wlist->y_size, "Cub3D"))) return (-1); clist->wlist->inited = 1; - ft_printf("Created window of size %ux%u\n", - clist->wlist->x_size, clist->wlist->y_size); + ft_printf("Created window of size %ux%u\nHost OS: %s\n", + clist->wlist->x_size, clist->wlist->y_size, FT_OS); return (0); } -- cgit v1.2.3