From 8700e35db3f411eb3ce59ec655f42ab1ae37c128 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Sat, 28 Feb 2026 12:20:19 +0100 Subject: [PATCH 1/4] Cleanup include guards --- include/cute_defer.h | 5 +++++ include/cute_noise.h | 6 +++--- include/cute_user_config.h | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/cute_defer.h b/include/cute_defer.h index 7259a4d65..8a822ac75 100644 --- a/include/cute_defer.h +++ b/include/cute_defer.h @@ -5,6 +5,9 @@ This software is dual-licensed with zlib or Unlicense, check LICENSE.txt for more info */ +#ifndef CF_DEFER_H +#define CF_DEFER_H + #include "cute_defines.h" #ifdef CF_CPP @@ -61,3 +64,5 @@ static CF_ScopeExit s_create_scope_helper(T func) #define CF_DEFER(L) const auto& CF_TOKEN_PASTE(CF_ScopeExit, __LINE__) = s_create_scope_helper([&]() { L; }) #endif // CF_CPP + +#endif // CF_DEFER_H diff --git a/include/cute_noise.h b/include/cute_noise.h index d0b31ff1d..741454344 100644 --- a/include/cute_noise.h +++ b/include/cute_noise.h @@ -5,8 +5,8 @@ This software is dual-licensed with zlib or Unlicense, check LICENSE.txt for more info */ -#ifndef CUTE_PERLIN_H -#define CUTE_PERLIN_H +#ifndef CF_NOISE_H +#define CF_NOISE_H #include "cute_defines.h" #include "cute_graphics.h" @@ -211,4 +211,4 @@ CF_INLINE CF_Pixel* noise_fbm_pixels_wrapped(int w, int h, uint64_t seed, float #endif // CF_CPP -#endif // CUTE_PERLIN_H +#endif // CF_NOISE_H diff --git a/include/cute_user_config.h b/include/cute_user_config.h index 6c3c638eb..28e04fe43 100644 --- a/include/cute_user_config.h +++ b/include/cute_user_config.h @@ -5,8 +5,8 @@ This software is dual-licensed with zlib or Unlicense, check LICENSE.txt for more info */ -#ifndef CUTE_USER_CONFIG_H -#define CUTE_USER_CONFIG_H +#ifndef CF_USER_CONFIG_H +#define CF_USER_CONFIG_H /** * Feel free to override any macros in Cute Framework with your own. These are mainly to change the default @@ -50,4 +50,4 @@ * CF_FMODF */ -#endif // CUTE_USER_CONFIG_H +#endif // CF_USER_CONFIG_H From 41d83efb8450b0bb819b2946b81718f9de2881ce Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Sat, 28 Feb 2026 12:20:28 +0100 Subject: [PATCH 2/4] Add missing include --- include/cute.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/cute.h b/include/cute.h index e15ed7b19..7852c0145 100644 --- a/include/cute.h +++ b/include/cute.h @@ -43,6 +43,7 @@ #include "cute_guid.h" #include "cute_graphics.h" #include "cute_map.h" +#include "cute_haptics.h" #include "cute_https.h" #include "cute_image.h" #include "cute_input.h" From 0ef150c98ad645bda3915f4c083d9641a096b682 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Sat, 28 Feb 2026 12:20:43 +0100 Subject: [PATCH 3/4] Use double-quotes for local includes --- include/cute_networking.h | 4 ++-- include/cute_shader_bytecode.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/cute_networking.h b/include/cute_networking.h index 4e75690ac..b41bdc9b2 100644 --- a/include/cute_networking.h +++ b/include/cute_networking.h @@ -8,12 +8,12 @@ #ifndef CF_NETWORKING_H #define CF_NETWORKING_H -#include +#include "cute_defines.h" // This entire file makes no sense for web builds, since web doesn't allow UDP. #ifndef CF_EMSCRIPTEN -#include +#include "cute_result.h" #include //-------------------------------------------------------------------------------------------------- diff --git a/include/cute_shader_bytecode.h b/include/cute_shader_bytecode.h index 281660783..469146a05 100644 --- a/include/cute_shader_bytecode.h +++ b/include/cute_shader_bytecode.h @@ -8,7 +8,7 @@ #ifndef CF_SHADER_BYTECODE_H #define CF_SHADER_BYTECODE_H -#include +#include "cute_defines.h" #ifdef __cplusplus extern "C" { From ae24ee6eb0035f3b95b18c36c00204817eb173aa Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Sat, 28 Feb 2026 12:46:24 +0100 Subject: [PATCH 4/4] Fix haptics header --- include/cute_haptics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cute_haptics.h b/include/cute_haptics.h index 42bb3d6ce..a0c44784b 100644 --- a/include/cute_haptics.h +++ b/include/cute_haptics.h @@ -471,7 +471,7 @@ CF_INLINE const char* to_string(HapticWaveType type) } } -CF_INLINE Haptic haptic_open(Joypad joypad) { return cf_haptic_open(joypad); } +CF_INLINE Haptic haptic_open(int player_index) { return cf_haptic_open(player_index); } CF_INLINE void haptic_close(Haptic haptic) { cf_haptic_close(haptic); } CF_INLINE bool haptic_supports(Haptic haptic, HapticType type) { return cf_haptic_supports(haptic,type); } CF_INLINE void haptic_set_gain(Haptic haptic, float gain) { cf_haptic_set_gain(haptic,gain); }