diff options
| author | Ray <[email protected]> | 2018-02-11 01:48:53 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2018-02-11 01:48:53 +0100 |
| commit | d90a33b850d825c3047fd570478fc8a66f22414f (patch) | |
| tree | f589ca4e7edebb0f990e994cf213c8fe85cbe86c /src | |
| parent | 231a69417ab5a9627fc9972392e7146ddea07106 (diff) | |
| download | raylib-d90a33b850d825c3047fd570478fc8a66f22414f.tar.gz raylib-d90a33b850d825c3047fd570478fc8a66f22414f.zip | |
Some reviews for Android compilation
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 14 | ||||
| -rw-r--r-- | src/core.c | 4 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/Makefile b/src/Makefile index e41a88a3..6752d9e7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -262,15 +262,20 @@ endif # -Wno-missing-braces ignore invalid warning (GCC bug 53119) # -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec # -Werror=pointer-arith catch unportable code that does direct arithmetic on void pointers -# -Werror=implicit-function-declaration catch function calls without prior declaration -CFLAGS += -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -fgnu89-inline -Wno-missing-braces -Werror=pointer-arith -Werror=implicit-function-declaration +CFLAGS += -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -fgnu89-inline -Wno-missing-braces -Werror=pointer-arith ifeq ($(RAYLIB_BUILD_MODE), DEBUG) CFLAGS += -g endif # Additional flags for compiler (if desired) -#CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes +# -Wextra enables some extra warning flags that are not enabled by -Wall +# -Wmissing-prototypes warn if a global function is defined without a previous prototype declaration +# -Wstrict-prototypes warn if a function is declared or defined without specifying the argument types +# -Werror=implicit-function-declaration catch function calls without prior declaration +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + CFLAGS += -Werror=implicit-function-declaration +endif ifeq ($(PLATFORM),PLATFORM_WEB) # -O2 # if used, also set --memory-init-file 0 # --memory-init-file 0 # to avoid an external memory initialization code file (.mem) @@ -285,7 +290,8 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID) # Compilation functions attributes options CFLAGS += -ffunction-sections -funwind-tables -fstack-protector-strong -fPIC # Compiler options for the linker - CFLAGS += -Wa,--noexecstack -Wformat -Werror=format-security -no-canonical-prefixes + # -Werror=format-security + CFLAGS += -Wa,--noexecstack -Wformat -no-canonical-prefixes # Preprocessor macro definitions CFLAGS += -DANDROID -DPLATFORM_ANDROID -D__ANDROID_API__=16 endif @@ -294,11 +294,11 @@ static int renderOffsetX = 0; // Offset X from render area (must b static int renderOffsetY = 0; // Offset Y from render area (must be divided by 2) static bool fullscreen = false; // Fullscreen mode (useful only for PLATFORM_DESKTOP) static Matrix downscaleView; // Matrix to downscale view (in case screen size bigger than display size) +static bool cursorHidden = false; // Track if cursor is hidden +static bool cursorOnScreen = false; // Tracks if cursor is inside client area #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) || defined(PLATFORM_UWP) static const char *windowTitle = NULL; // Window text title... -static bool cursorHidden = false; // Track if cursor is hidden -static bool cursorOnScreen = false; // Tracks if cursor is inside client area static int screenshotCounter = 0; // Screenshots counter // Register mouse states |
