diff --git a/src/lsi.c b/src/lsi.c index 2c6c81f..591b9a0 100644 --- a/src/lsi.c +++ b/src/lsi.c @@ -9,19 +9,10 @@ * of the License, or (at your option) any later version. */ -#include #include #include "lsi.h" -bool lsi_system_is_64bit(void) -{ -#if UINTPTR_MAX == 0xffffffffffffffff - return true; -#endif - return false; -} - bool lsi_config_load(__lsi_unused__ LsiConfig *config) { fputs("lsi_config_load(): Not yet implemented", stderr); diff --git a/src/lsi.h b/src/lsi.h index 8bda125..371a668 100644 --- a/src/lsi.h +++ b/src/lsi.h @@ -12,10 +12,13 @@ #pragma once #include +#include /* Mark a variable/argument as unused to skip warnings */ #define __lsi_unused__ __attribute__((unused)) +/* Force inlining of a function */ +#define __lsi_inline__ __attribute__((always_inline)) /** * Current Linux Steam Integration settings. */ @@ -40,8 +43,16 @@ bool lsi_config_store(LsiConfig *config); /** * Determine if the host system is 64-bit. + * + * @returns true if 64-bit, otherwise false */ -bool lsi_system_is_64bit(void); +__lsi_inline__ static inline bool lsi_system_is_64bit(void) +{ +#if UINTPTR_MAX == 0xffffffffffffffff + return true; +#endif + return false; +} /* * Editor modelines - https://www.wireshark.org/tools/modelines.html