From ce1c94d84bdf0e5de68ec8a06c8372ad56c3b16c Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Sun, 11 Sep 2022 13:53:59 -0400 Subject: [PATCH] Fix Apple Silicon with incorrect NK_SITE_TYPE and NK_POINTER_TYPE --- nuklear.h | 5 +++-- src/CHANGELOG | 1 + src/nuklear.h | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nuklear.h b/nuklear.h index 7af8bb1..bb5917c 100644 --- a/nuklear.h +++ b/nuklear.h @@ -372,7 +372,7 @@ extern "C" { #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) #define NK_SIZE_TYPE unsigned __int32 #elif defined(__GNUC__) || defined(__clang__) - #if defined(__x86_64__) || defined(__ppc64__) + #if defined(__x86_64__) || defined(__ppc64__) || defined(__aarch64__) #define NK_SIZE_TYPE unsigned long #else #define NK_SIZE_TYPE unsigned int @@ -387,7 +387,7 @@ extern "C" { #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) #define NK_POINTER_TYPE unsigned __int32 #elif defined(__GNUC__) || defined(__clang__) - #if defined(__x86_64__) || defined(__ppc64__) + #if defined(__x86_64__) || defined(__ppc64__) || defined(__aarch64__) #define NK_POINTER_TYPE unsigned long #else #define NK_POINTER_TYPE unsigned int @@ -29656,6 +29656,7 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args) /// - [y]: Minor version with non-breaking API and library changes /// - [z]: Patch version with no direct changes to the API /// +/// - 2022/08/01 (4.10.2) - Fix Apple Silicon with incorrect NK_SITE_TYPE and NK_POINTER_TYPE /// - 2022/08/01 (4.10.1) - Fix cursor jumping back to beginning of text when typing more than /// nk_edit_xxx limit /// - 2022/05/27 (4.10.0) - Add nk_input_has_mouse_click_in_button_rect() to fix window move bug diff --git a/src/CHANGELOG b/src/CHANGELOG index 00ee208..2ddafe1 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -7,6 +7,7 @@ /// - [y]: Minor version with non-breaking API and library changes /// - [z]: Patch version with no direct changes to the API /// +/// - 2022/08/01 (4.10.2) - Fix Apple Silicon with incorrect NK_SITE_TYPE and NK_POINTER_TYPE /// - 2022/08/01 (4.10.1) - Fix cursor jumping back to beginning of text when typing more than /// nk_edit_xxx limit /// - 2022/05/27 (4.10.0) - Add nk_input_has_mouse_click_in_button_rect() to fix window move bug diff --git a/src/nuklear.h b/src/nuklear.h index 67b2aa9..03f7514 100644 --- a/src/nuklear.h +++ b/src/nuklear.h @@ -151,7 +151,7 @@ extern "C" { #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) #define NK_SIZE_TYPE unsigned __int32 #elif defined(__GNUC__) || defined(__clang__) - #if defined(__x86_64__) || defined(__ppc64__) + #if defined(__x86_64__) || defined(__ppc64__) || defined(__aarch64__) #define NK_SIZE_TYPE unsigned long #else #define NK_SIZE_TYPE unsigned int @@ -166,7 +166,7 @@ extern "C" { #elif (defined(_WIN32) || defined(WIN32)) && defined(_MSC_VER) #define NK_POINTER_TYPE unsigned __int32 #elif defined(__GNUC__) || defined(__clang__) - #if defined(__x86_64__) || defined(__ppc64__) + #if defined(__x86_64__) || defined(__ppc64__) || defined(__aarch64__) #define NK_POINTER_TYPE unsigned long #else #define NK_POINTER_TYPE unsigned int