Skip to content

Commit

Permalink
Update raylib and nuklear
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLoach committed Sep 20, 2022
1 parent 57511ff commit ac69ff2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.11)
project(raylib_nuklear
DESCRIPTION "raylib_nuklear: Nuklear immediate mode GUI for raylib."
HOMEPAGE_URL "https://github.com/robloach/raylib-nuklear"
VERSION 4.1.1
VERSION 4.2.0
LANGUAGES C
)

Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if (NOT raylib_FOUND)
FetchContent_Declare(
raylib
GIT_REPOSITORY https://github.com/raysan5/raylib.git
GIT_TAG 4.0.0
GIT_TAG 4.2.0
)
FetchContent_GetProperties(raylib)
if (NOT raylib_POPULATED) # Have we downloaded raylib yet?
Expand Down
9 changes: 6 additions & 3 deletions include/nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -26162,7 +26162,7 @@ nk_textedit_text(struct nk_text_edit *state, const char *text, int total_len)
text+text_len, 1))
{
nk_textedit_makeundo_insert(state, state->cursor, 1);
++state->cursor;
state->cursor = NK_MIN(state->cursor + 1, state->string.len);
state->has_preferred_x = 0;
}
}
Expand Down Expand Up @@ -29656,6 +29656,9 @@ 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
/// - 2022/04/18 (4.9.7) - Change button behavior when NK_BUTTON_TRIGGER_ON_RELEASE is defined to
/// only trigger when the mouse position was inside the same button on down
Expand Down
6 changes: 3 additions & 3 deletions include/raylib-nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* - Use the nuklear immediate-mode graphical user interface in raylib.
*
* DEPENDENCIES:
* - raylib 4.0 https://www.raylib.com/
* - raylib 4.2 https://www.raylib.com/
* - nuklear https://github.com/Immediate-Mode-UI/Nuklear
*
* LICENSE: zlib/libpng
Expand Down Expand Up @@ -95,7 +95,7 @@ NK_API void CleanupNuklearImage(struct nk_image img); // Frees the
#endif // NK_COS
#ifndef NK_SIN
#define NK_SIN sinf
#endif // NK_COS
#endif // NK_SIN
#ifndef NK_INV_SQRT
#define NK_INV_SQRT(value) (1.0f / sqrtf(value))
#endif // NK_INV_SQRT
Expand Down Expand Up @@ -816,7 +816,7 @@ NK_API void UnloadNuklearImage(struct nk_image img)
*/
NK_API void CleanupNuklearImage(struct nk_image img)
{
free(img.handle.ptr);
MemFree(img.handle.ptr);
}

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion vendor/nuklear

0 comments on commit ac69ff2

Please sign in to comment.