From 0c787264c6c988eb714127c78745294c53502a97 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Wed, 10 Dec 2025 11:15:52 +0900 Subject: [PATCH] fix some stuff --- include/Mw/BaseTypes.h | 12 ++++++------ src/core.c | 1 - src/widget/scrollbar.c | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/Mw/BaseTypes.h b/include/Mw/BaseTypes.h index 7b92c93..ca718ea 100644 --- a/include/Mw/BaseTypes.h +++ b/include/Mw/BaseTypes.h @@ -31,7 +31,7 @@ typedef uint16_t MwU16; typedef int8_t MwI8; typedef uint8_t MwU8; -#define OTHER_TYPES_DEFINED +#define MW_OTHER_TYPES_DEFINED #elif __GNUC__ > 2 typedef long long MwI64; typedef unsigned long long MwU64; @@ -48,18 +48,18 @@ typedef unsigned __int16 MwU16; typedef __int8 MwI8; typedef unsigned __int8 MwU8; -#define OTHER_TYPES_DEFINED +#define MW_OTHER_TYPES_DEFINED #else /* out of hope */ typedef long MwI64; typedef unsigned long MwU64; #endif -#ifdef OTHER_TYPES_DEFINED -#undef OTHER_TYPES_DEFINED +#ifdef MW_OTHER_TYPES_DEFINED +#undef MW_OTHER_TYPES_DEFINED #else -typedef int MwI32; -typedef unsigned int MwU32; +typedef int MwI32; +typedef unsigned int MwU32; typedef short MwI16; typedef unsigned short MwU16; diff --git a/src/core.c b/src/core.c index 9a5fd14..ec7cb7d 100644 --- a/src/core.c +++ b/src/core.c @@ -1,7 +1,6 @@ #include #include "../external/stb_ds.h" -#include "Mw/LowLevel.h" static void lldrawhandler(MwLL handle, void* data) { MwWidget h = (MwWidget)handle->common.user; diff --git a/src/widget/scrollbar.c b/src/widget/scrollbar.c index ebfcb40..6490b06 100644 --- a/src/widget/scrollbar.c +++ b/src/widget/scrollbar.c @@ -142,7 +142,7 @@ static void draw(MwWidget handle) { } static void mouse_move(MwWidget handle) { - int or = MwGetInteger(handle, MwNorientation); + int or = MwGetInteger(handle, MwNorientation); scrollbar_t* scr = handle->internal; if(!handle->pressed) return; @@ -170,9 +170,9 @@ static void mouse_move(MwWidget handle) { } static void mouse_down(MwWidget handle, void* ptr) { - int ww = MwGetInteger(handle, MwNwidth); - int wh = MwGetInteger(handle, MwNheight); - int or = MwGetInteger(handle, MwNorientation); + int ww = MwGetInteger(handle, MwNwidth); + int wh = MwGetInteger(handle, MwNheight); + int or = MwGetInteger(handle, MwNorientation); scrollbar_t* scr = handle->internal; MwLLMouse* m = ptr;