From 699a68a9ac07afb74282781d9c0339c60f78defa Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Sat, 21 Mar 2020 21:59:12 +0800 Subject: [PATCH] tune constant macros --- src/ial/ial.c | 3 +-- src/include/newgal.h | 8 ++++++++ src/newgal/newgal.c | 3 +-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ial/ial.c b/src/ial/ial.c index cb31ab3e..21e6fbdf 100644 --- a/src/ial/ial.c +++ b/src/ial/ial.c @@ -133,8 +133,7 @@ #include "linux-libinput.h" #endif -#define LEN_ENGINE_NAME 16 -#define LEN_MTYPE_NAME 16 +#define LEN_MTYPE_NAME 23 static INPUT inputs [] = { diff --git a/src/include/newgal.h b/src/include/newgal.h index d0b17f92..f09d7ffe 100644 --- a/src/include/newgal.h +++ b/src/include/newgal.h @@ -57,6 +57,14 @@ #include "gdi.h" +#define LEN_SO_NAME 127 // name length of a shared object (library) +#define LEN_DEVICE_NAME 127 +#define LEN_EXDRIVER_NAME LEN_SO_NAME +#define LEN_ENGINE_NAME 23 +#define LEN_VIDEO_MODE 31 +#define LEN_MTYPE_NAME 23 +#define LEN_FOURCC_FORMAT 7 + #define DISABLE_THREADS #define GAL_mutex int diff --git a/src/newgal/newgal.c b/src/newgal/newgal.c index d05e3c77..e8be4e22 100644 --- a/src/newgal/newgal.c +++ b/src/newgal/newgal.c @@ -64,8 +64,7 @@ GAL_Surface* __gal_screen; -#define LEN_ENGINE_NAME 10 -#define LEN_MODE 20 +#define LEN_MODE LEN_VIDEO_MODE BOOL GAL_ParseVideoMode (const char* mode, int* w, int* h, int* depth) {