diff --git a/src/raylib.h b/src/raylib.h index e4be11084..ed56dc3e6 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1027,6 +1027,7 @@ RLAPI bool IsCursorHidden(void); // Check if cu RLAPI void EnableCursor(void); // Enables cursor (unlock cursor) RLAPI void DisableCursor(void); // Disables cursor (lock cursor) RLAPI bool IsCursorOnScreen(void); // Check if cursor is on the screen +RLAPI bool IsCursorDisabled(void); // Check if cursor is disabled (locked) // Drawing-related functions RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color) diff --git a/src/rcore.c b/src/rcore.c index f87b68783..2e475fbae 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -889,6 +889,12 @@ bool IsCursorOnScreen(void) return CORE.Input.Mouse.cursorOnScreen; } +// Check if cursor is disabled (locked) +bool IsCursorDisabled(void) +{ + return CORE.Input.Mouse.cursorLocked; +} + //---------------------------------------------------------------------------------- // Module Functions Definition: Screen Drawing //----------------------------------------------------------------------------------