aboutsummaryrefslogtreecommitdiff
path: root/src/core.c
diff options
context:
space:
mode:
authorPalaui <sucdepressec@gmail.com>2014-12-09 13:10:05 +0100
committerPalaui <sucdepressec@gmail.com>2014-12-09 13:10:05 +0100
commit29d8b48503f3064cdc1f3a87c01b4264e716a220 (patch)
tree31096a173fa4fb61fd9d912169abbf65fcf269c6 /src/core.c
parent63ed471ed24ed1b328cc90f03a88130511725e88 (diff)
downloadraylib-29d8b48503f3064cdc1f3a87c01b4264e716a220.tar.gz
raylib-29d8b48503f3064cdc1f3a87c01b4264e716a220.zip
Corrected some bugs...
[core] Added SetMousePosition() [models] LoadHeightmap() - Corrected textures bug [raymath] Functions renaming [WEB] Prepare environment for emscripten!
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index dec08eeb..62ab5cbb 100644
--- a/src/core.c
+++ b/src/core.c
@@ -165,7 +165,7 @@ static const char *windowTitle; // Window text title...
static char configFlags = 0;
static bool customCursor = false; // Tracks if custom cursor has been set
-static bool cursorOnScreen = true; // Tracks if cursor is inside client area
+static bool cursorOnScreen = false; // Tracks if cursor is inside client area
static Texture2D cursor; // Cursor texture
static Vector2 mousePosition;
@@ -727,6 +727,15 @@ Vector2 GetMousePosition(void)
return mousePosition;
}
+// Set mouse position XY
+void SetMousePosition(Vector2 position)
+{
+ mousePosition = position;
+#if defined(PLATFORM_DESKTOP)
+ glfwSetCursorPos(window, position.x, position.y);
+#endif
+}
+
// Returns mouse wheel movement Y
int GetMouseWheelMove(void)
{