From deb70f96863b9afd9c5b0abde42bbc1b6a9ce831 Mon Sep 17 00:00:00 2001
From: DarkGod <darkgod@net-core.org>
Date: Sat, 10 Jan 2015 01:10:12 +0100
Subject: [PATCH] hum

---
 src/core_lua.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/core_lua.c b/src/core_lua.c
index 506be8f44b..56b97adf39 100644
--- a/src/core_lua.c
+++ b/src/core_lua.c
@@ -355,11 +355,18 @@ static int lua_set_current_mousehandler(lua_State *L)
 
 	return 0;
 }
+static int lua_mouse_show(lua_State *L)
+{
+	SDL_ShowCursor(lua_toboolean(L, 1) ? TRUE : FALSE);
+	return 0;
+}
+
 static int lua_is_touch_enabled(lua_State *L)
 {
 	lua_pushboolean(L, SDL_GetNumTouchDevices() > 0);
 	return 1;
 }
+
 static int lua_is_gamepad_enabled(lua_State *L)
 {
 	if (!SDL_NumJoysticks()) return 0;
@@ -367,10 +374,12 @@ static int lua_is_gamepad_enabled(lua_State *L)
 	lua_pushstring(L, str);
 	return 1;
 }
+
 static const struct luaL_Reg mouselib[] =
 {
 	{"touchCapable", lua_is_touch_enabled},
 	{"gamepadCapable", lua_is_gamepad_enabled},
+	{"show", lua_mouse_show},
 	{"get", lua_get_mouse},
 	{"set", lua_set_mouse},
 	{"set_current_handler", lua_set_current_mousehandler},
-- 
GitLab