Skip to content

Commit 5361265

Browse files
committed
WARNING: BREAKING: REDESIGNED: raylib build features config system #4411 #4554
Redesigned to support disabling features on compilation with `-DSUPPORT_FEATURE=0` REMOVED: `SUPPORT_DEFAULT_FONT`, always supported REMOVED: `SUPPORT_IMAGE_MANIPULATION `, always supported REMOVED: `SUPPORT_TEXT_MANIPULATION`, always supported REDESIGNED: `SUPPORT_FONT_ATLAS_WHITE_REC` to `FONT_ATLAS_CORNER_REC_SIZE` REVIEWED: Config values (other than 0-1) are already defined on respective modules Other config tweaks here and there
1 parent 304e489 commit 5361265

17 files changed

Lines changed: 645 additions & 645 deletions

src/config.h

Lines changed: 276 additions & 220 deletions
Large diffs are not rendered by default.

src/external/rlsw.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ SWAPI void swBindTexture(uint32_t id);
644644
#define SW_ARCH_RISCV
645645
#endif
646646

647-
#if defined(RLSW_USE_SIMD_INTRINSICS)
647+
#if RLSW_USE_SIMD_INTRINSICS
648648
// Check for SIMD vector instructions
649649
// NOTE: Compiler is responsible to enable required flags for host device,
650650
// supported features are detected at compiler init but varies depending on compiler
@@ -695,7 +695,7 @@ SWAPI void swBindTexture(uint32_t id);
695695
#define SW_HAS_RVV
696696
#include <riscv_vector.h>
697697
#endif
698-
#endif // RLSW_USE_SIMD_INTRINSICS
698+
#endif
699699

700700
#ifdef __cplusplus
701701
#define SW_CURLY_INIT(name) name

src/platforms/rcore_android.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ const char *GetKeyName(int key)
713713
// Register all input events
714714
void PollInputEvents(void)
715715
{
716-
#if defined(SUPPORT_GESTURES_SYSTEM)
716+
#if SUPPORT_GESTURES_SYSTEM
717717
// NOTE: Gestures update must be called every frame to reset gestures correctly
718718
// because ProcessGestureEvent() is just called on an event, not every frame
719719
UpdateGestures();
@@ -1065,11 +1065,11 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd)
10651065
// Initialize hi-res timer
10661066
InitTimer();
10671067

1068-
#if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_DEFAULT_FONT)
1068+
#if SUPPORT_MODULE_RTEXT
10691069
// Load default font
10701070
// WARNING: External function: Module required: rtext
10711071
LoadFontDefault();
1072-
#if defined(SUPPORT_MODULE_RSHAPES)
1072+
#if SUPPORT_MODULE_RSHAPES
10731073
// Set font white rectangle for shapes drawing, so shapes and text can be batched together
10741074
// WARNING: rshapes module is required, if not available, default internal white rectangle is used
10751075
Rectangle rec = GetFontDefault().recs[95];
@@ -1085,7 +1085,7 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd)
10851085
}
10861086
#endif
10871087
#else
1088-
#if defined(SUPPORT_MODULE_RSHAPES)
1088+
#if SUPPORT_MODULE_RSHAPES
10891089
// Set default texture and rectangle to be used for shapes drawing
10901090
// NOTE: rlgl default texture is a 1x1 pixel UNCOMPRESSED_R8G8B8A8
10911091
Texture2D texture = { rlGetTextureIdDefault(), 1, 1, 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 };
@@ -1347,7 +1347,7 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
13471347
}
13481348
}
13491349

1350-
#if defined(SUPPORT_GESTURES_SYSTEM)
1350+
#if SUPPORT_GESTURES_SYSTEM
13511351
GestureEvent gestureEvent = { 0 };
13521352

13531353
gestureEvent.pointCount = 0;

src/platforms/rcore_desktop_glfw.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
#define GLFW_NATIVE_INCLUDE_NONE // To avoid some symbols re-definition in windows.h
6666
#include "GLFW/glfw3native.h"
6767

68-
#if defined(SUPPORT_WINMM_HIGHRES_TIMER) && !defined(SUPPORT_BUSY_WAIT_LOOP)
68+
#if SUPPORT_WINMM_HIGHRES_TIMER && !SUPPORT_BUSY_WAIT_LOOP
6969
// NOTE: Those functions require linking with winmm library
7070
//#pragma warning(disable: 4273)
7171
__declspec(dllimport) unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
@@ -1048,7 +1048,7 @@ Image GetClipboardImage(void)
10481048
{
10491049
Image image = { 0 };
10501050

1051-
#if defined(SUPPORT_CLIPBOARD_IMAGE)
1051+
#if SUPPORT_CLIPBOARD_IMAGE
10521052
#if defined(_WIN32)
10531053
unsigned long long int dataSize = 0;
10541054
void *bmpData = NULL;
@@ -1062,7 +1062,7 @@ Image GetClipboardImage(void)
10621062
#else
10631063
TRACELOG(LOG_WARNING, "GetClipboardImage() not implemented on target platform");
10641064
#endif
1065-
#endif // SUPPORT_CLIPBOARD_IMAGE
1065+
#endif
10661066

10671067
return image;
10681068
}
@@ -1202,7 +1202,7 @@ const char *GetKeyName(int key)
12021202
// Register all input events
12031203
void PollInputEvents(void)
12041204
{
1205-
#if defined(SUPPORT_GESTURES_SYSTEM)
1205+
#if SUPPORT_GESTURES_SYSTEM
12061206
// NOTE: Gestures update must be called every frame to reset gestures correctly
12071207
// because ProcessGestureEvent() is just called on an event, not every frame
12081208
UpdateGestures();
@@ -1514,7 +1514,7 @@ int InitPlatform(void)
15141514
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); // Choose OpenGL minor version (just hint)
15151515
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
15161516
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_FALSE);
1517-
#if defined(RLGL_ENABLE_OPENGL_DEBUG_CONTEXT)
1517+
#if RLGL_ENABLE_OPENGL_DEBUG_CONTEXT
15181518
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE); // Enable OpenGL Debug Context
15191519
#endif
15201520
}
@@ -1819,7 +1819,7 @@ void ClosePlatform(void)
18191819
glfwDestroyWindow(platform.handle);
18201820
glfwTerminate();
18211821

1822-
#if defined(_WIN32) && defined(SUPPORT_WINMM_HIGHRES_TIMER) && !defined(SUPPORT_BUSY_WAIT_LOOP)
1822+
#if defined(_WIN32) && SUPPORT_WINMM_HIGHRES_TIMER && !SUPPORT_BUSY_WAIT_LOOP
18231823
timeEndPeriod(1); // Restore time period
18241824
#endif
18251825
}
@@ -2049,7 +2049,7 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int
20492049
CORE.Input.Mouse.currentButtonState[button] = action;
20502050
CORE.Input.Touch.currentTouchState[button] = action;
20512051

2052-
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
2052+
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
20532053
// Process mouse events as touches to be able to use mouse-gestures
20542054
GestureEvent gestureEvent = { 0 };
20552055

@@ -2084,7 +2084,7 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
20842084
CORE.Input.Mouse.currentPosition.y = (float)y;
20852085
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
20862086

2087-
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
2087+
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
20882088
// Process mouse events as touches to be able to use mouse-gestures
20892089
GestureEvent gestureEvent = { 0 };
20902090

src/platforms/rcore_desktop_sdl.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ void *SDL_GetClipboardData(const char *mime_type, size_t *size)
423423
// We could possibly implement it ourselves in this case for some easier platforms
424424
return NULL;
425425
}
426-
427426
#endif // USING_VERSION_SDL3
428427

429428
//----------------------------------------------------------------------------------
@@ -1163,7 +1162,7 @@ Image GetClipboardImage(void)
11631162
{
11641163
Image image = { 0 };
11651164

1166-
#if defined(SUPPORT_CLIPBOARD_IMAGE)
1165+
#if SUPPORT_CLIPBOARD_IMAGE
11671166
// Let's hope compiler put these arrays in static memory
11681167
const char *imageFormats[] = {
11691168
"image/bmp",
@@ -1350,7 +1349,7 @@ const char *GetKeyName(int key)
13501349
// Register all input events
13511350
void PollInputEvents(void)
13521351
{
1353-
#if defined(SUPPORT_GESTURES_SYSTEM)
1352+
#if SUPPORT_GESTURES_SYSTEM
13541353
// NOTE: Gestures update must be called every frame to reset gestures correctly
13551354
// because ProcessGestureEvent() is just called on an event, not every frame
13561355
UpdateGestures();
@@ -1892,7 +1891,7 @@ void PollInputEvents(void)
18921891
default: break;
18931892
}
18941893

1895-
#if defined(SUPPORT_GESTURES_SYSTEM)
1894+
#if SUPPORT_GESTURES_SYSTEM
18961895
if (touchAction > -1)
18971896
{
18981897
// Process mouse events as touches to be able to use mouse-gestures
@@ -1989,7 +1988,7 @@ int InitPlatform(void)
19891988
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
19901989
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
19911990
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
1992-
#if defined(RLGL_ENABLE_OPENGL_DEBUG_CONTEXT)
1991+
#if RLGL_ENABLE_OPENGL_DEBUG_CONTEXT
19931992
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG); // Enable OpenGL Debug Context
19941993
#endif
19951994
}
@@ -2113,7 +2112,7 @@ int InitPlatform(void)
21132112
// NOTE: No need to call InitTimer(), let SDL manage it internally
21142113
CORE.Time.previous = GetTime(); // Get time as double
21152114

2116-
#if defined(_WIN32) && defined(SUPPORT_WINMM_HIGHRES_TIMER) && !defined(SUPPORT_BUSY_WAIT_LOOP)
2115+
#if defined(_WIN32) && SUPPORT_WINMM_HIGHRES_TIMER && !SUPPORT_BUSY_WAIT_LOOP
21172116
SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "1"); // SDL equivalent of timeBeginPeriod() and timeEndPeriod()
21182117
#endif
21192118
//----------------------------------------------------------------------------

src/platforms/rcore_drm.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
#include <errno.h> // Required for: EBUSY, EAGAIN
8181

8282
#define MAX_DRM_CACHED_BUFFERS 3
83-
#endif // SUPPORT_DRM_CACHE
83+
#endif
8484

8585
#ifndef EGL_OPENGL_ES3_BIT
8686
#define EGL_OPENGL_ES3_BIT 0x40
@@ -160,7 +160,7 @@ static FramebufferCache fbCache[MAX_DRM_CACHED_BUFFERS] = { 0 };
160160
static volatile int fbCacheCount = 0;
161161
static volatile bool pendingFlip = false;
162162
static bool crtcSet = false;
163-
#endif // SUPPORT_DRM_CACHE
163+
#endif
164164

165165
//----------------------------------------------------------------------------------
166166
// Global Variables Definition
@@ -253,7 +253,7 @@ static const short linuxToRaylibMap[KEYMAP_SIZE] = {
253253
int InitPlatform(void); // Initialize platform (graphics, inputs and more)
254254
void ClosePlatform(void); // Close platform
255255

256-
#if defined(SUPPORT_SSH_KEYBOARD_RPI)
256+
#if SUPPORT_SSH_KEYBOARD_RPI
257257
static void InitKeyboard(void); // Initialize raw keyboard system
258258
static void RestoreKeyboard(void); // Restore keyboard system
259259
static void ProcessKeyboard(void); // Process keyboard events
@@ -1065,7 +1065,7 @@ const char *GetKeyName(int key)
10651065
// Register all input events
10661066
void PollInputEvents(void)
10671067
{
1068-
#if defined(SUPPORT_GESTURES_SYSTEM)
1068+
#if SUPPORT_GESTURES_SYSTEM
10691069
// NOTE: Gestures update must be called every frame to reset gestures correctly
10701070
// because ProcessGestureEvent() is just called on an event, not every frame
10711071
UpdateGestures();
@@ -1088,7 +1088,7 @@ void PollInputEvents(void)
10881088

10891089
PollKeyboardEvents();
10901090

1091-
#if defined(SUPPORT_SSH_KEYBOARD_RPI)
1091+
#if SUPPORT_SSH_KEYBOARD_RPI
10921092
// NOTE: Keyboard reading could be done using input_event(s) or just read from stdin, both methods are used here
10931093
// stdin reading is still used for legacy purposes, it allows keyboard input trough SSH console
10941094
if (!platform.eventKeyboardMode) ProcessKeyboard();
@@ -1621,7 +1621,7 @@ int InitPlatform(void)
16211621
//----------------------------------------------------------------------------
16221622
InitEvdevInput(); // Evdev inputs initialization
16231623

1624-
#if defined(SUPPORT_SSH_KEYBOARD_RPI)
1624+
#if SUPPORT_SSH_KEYBOARD_RPI
16251625
InitKeyboard(); // Keyboard init (stdin)
16261626
#endif
16271627
//----------------------------------------------------------------------------
@@ -1741,7 +1741,7 @@ void ClosePlatform(void)
17411741
}
17421742
}
17431743

1744-
#if defined(SUPPORT_SSH_KEYBOARD_RPI)
1744+
#if SUPPORT_SSH_KEYBOARD_RPI
17451745
// Initialize Keyboard system (using standard input)
17461746
static void InitKeyboard(void)
17471747
{
@@ -1900,7 +1900,7 @@ static void ProcessKeyboard(void)
19001900
}
19011901
}
19021902
}
1903-
#endif // SUPPORT_SSH_KEYBOARD_RPI
1903+
#endif // SUPPORT_SSH_KEYBOARD_RPI
19041904

19051905
// Initialize user input from evdev(/dev/input/event<N>)
19061906
// this means mouse, keyboard or gamepad devices
@@ -2196,7 +2196,7 @@ static void PollKeyboardEvents(void)
21962196
// Check if the event is a key event
21972197
if (event.type != EV_KEY) continue;
21982198

2199-
#if defined(SUPPORT_SSH_KEYBOARD_RPI)
2199+
#if SUPPORT_SSH_KEYBOARD_RPI
22002200
// If the event was a key, we know a working keyboard is connected, so disable the SSH keyboard
22012201
platform.eventKeyboardMode = true;
22022202
#endif
@@ -2552,7 +2552,7 @@ static void PollMouseEvents(void)
25522552
CORE.Input.Touch.pointId[i] = -1;
25532553
}
25542554

2555-
#if defined(SUPPORT_GESTURES_SYSTEM)
2555+
#if SUPPORT_GESTURES_SYSTEM
25562556
if (touchAction > -1)
25572557
{
25582558
GestureEvent gestureEvent = { 0 };

src/platforms/rcore_memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ const char *GetKeyName(int key)
435435
// Register all input events
436436
void PollInputEvents(void)
437437
{
438-
#if defined(SUPPORT_GESTURES_SYSTEM)
438+
#if SUPPORT_GESTURES_SYSTEM
439439
// NOTE: Gestures update must be called every frame to reset gestures correctly
440440
// because ProcessGestureEvent() is just called on an event, not every frame
441441
UpdateGestures();

src/platforms/rcore_web.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ const char *GetKeyName(int key)
10071007
// Register all input events
10081008
void PollInputEvents(void)
10091009
{
1010-
#if defined(SUPPORT_GESTURES_SYSTEM)
1010+
#if SUPPORT_GESTURES_SYSTEM
10111011
// NOTE: Gestures update must be called every frame to reset gestures correctly
10121012
// because ProcessGestureEvent() is just called on an event, not every frame
10131013
UpdateGestures();
@@ -1210,7 +1210,7 @@ int InitPlatform(void)
12101210
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); // Choose OpenGL minor version (just hint)
12111211
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
12121212
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_FALSE);
1213-
#if defined(RLGL_ENABLE_OPENGL_DEBUG_CONTEXT)
1213+
#if RLGL_ENABLE_OPENGL_DEBUG_CONTEXT
12141214
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE); // Enable OpenGL Debug Context
12151215
#endif
12161216
}
@@ -1475,15 +1475,15 @@ static void WindowContentScaleCallback(GLFWwindow *window, float scalex, float s
14751475
// GLFW3: Called on windows minimized/restored
14761476
static void WindowIconifyCallback(GLFWwindow *window, int iconified)
14771477
{
1478-
if (iconified) FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was iconified
1479-
else FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was restored
1478+
if (iconified) FLAG_SET(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was iconified
1479+
else FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_MINIMIZED); // The window was restored
14801480
}
14811481

14821482
// GLFW3: Called on windows get/lose focus
14831483
static void WindowFocusCallback(GLFWwindow *window, int focused)
14841484
{
1485-
if (focused) FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window was focused
1486-
else FLAG_SET(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window lost focus
1485+
if (focused) FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window was focused
1486+
else FLAG_SET(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); // The window lost focus
14871487
}
14881488

14891489
// GLFW3: Called on file-drop over the window
@@ -1564,7 +1564,7 @@ static void MouseButtonCallback(GLFWwindow *window, int button, int action, int
15641564
CORE.Input.Mouse.currentButtonState[button] = action;
15651565
CORE.Input.Touch.currentTouchState[button] = action;
15661566

1567-
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
1567+
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
15681568
// Process mouse events as touches to be able to use mouse-gestures
15691569
GestureEvent gestureEvent = { 0 };
15701570

@@ -1605,7 +1605,7 @@ static void MouseMoveCallback(GLFWwindow *window, double x, double y)
16051605
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
16061606
}
16071607

1608-
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
1608+
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
16091609
// Process mouse events as touches to be able to use mouse-gestures
16101610
GestureEvent gestureEvent = { 0 };
16111611

@@ -1748,7 +1748,7 @@ static EM_BOOL EmscriptenTouchCallback(int eventType, const EmscriptenTouchEvent
17481748
CORE.Input.Mouse.currentPosition.y = CORE.Input.Touch.position[0].y;
17491749
}
17501750

1751-
#if defined(SUPPORT_GESTURES_SYSTEM)
1751+
#if SUPPORT_GESTURES_SYSTEM
17521752
GestureEvent gestureEvent = { 0 };
17531753
gestureEvent.pointCount = CORE.Input.Touch.pointCount;
17541754

src/platforms/rcore_web_emscripten.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ const char *GetKeyName(int key)
983983
// Register all input events
984984
void PollInputEvents(void)
985985
{
986-
#if defined(SUPPORT_GESTURES_SYSTEM)
986+
#if SUPPORT_GESTURES_SYSTEM
987987
// NOTE: Gestures update must be called every frame to reset gestures correctly
988988
// because ProcessGestureEvent() is just called on an event, not every frame
989989
UpdateGestures();
@@ -1321,7 +1321,7 @@ static EM_BOOL EmscriptenFocusCallback(int eventType, const EmscriptenFocusEvent
13211321

13221322
switch (eventType)
13231323
{
1324-
case EMSCRIPTEN_EVENT_BLUR: FLAG_SET(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); break; // The canvas lost focus
1324+
case EMSCRIPTEN_EVENT_BLUR: FLAG_SET(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); break;
13251325
case EMSCRIPTEN_EVENT_FOCUS: FLAG_CLEAR(CORE.Window.flags, FLAG_WINDOW_UNFOCUSED); break;
13261326
default: consumed = 0; break;
13271327
}
@@ -1457,7 +1457,7 @@ static EM_BOOL EmscriptenMouseCallback(int eventType, const EmscriptenMouseEvent
14571457
default: break;
14581458
}
14591459

1460-
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
1460+
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
14611461
// Process mouse events as touches to be able to use mouse-gestures
14621462
GestureEvent gestureEvent = { 0 };
14631463

@@ -1529,7 +1529,7 @@ static EM_BOOL EmscriptenMouseMoveCallback(int eventType, const EmscriptenMouseE
15291529
CORE.Input.Touch.position[0] = CORE.Input.Mouse.currentPosition;
15301530
}
15311531

1532-
#if defined(SUPPORT_GESTURES_SYSTEM) && defined(SUPPORT_MOUSE_GESTURES)
1532+
#if SUPPORT_GESTURES_SYSTEM && defined(SUPPORT_MOUSE_GESTURES)
15331533
// Process mouse events as touches to be able to use mouse-gestures
15341534
GestureEvent gestureEvent = { 0 };
15351535

@@ -1639,7 +1639,7 @@ static EM_BOOL EmscriptenTouchCallback(int eventType, const EmscriptenTouchEvent
16391639
CORE.Input.Mouse.currentPosition.y = CORE.Input.Touch.position[0].y;
16401640
}
16411641

1642-
#if defined(SUPPORT_GESTURES_SYSTEM)
1642+
#if SUPPORT_GESTURES_SYSTEM
16431643
GestureEvent gestureEvent = { 0 };
16441644
gestureEvent.pointCount = CORE.Input.Touch.pointCount;
16451645

0 commit comments

Comments
 (0)