Browse Source

The default error handler resets the mouse cursor now.

Alex Szpakowski 9 years ago
parent
commit
a590cf17aa
2 changed files with 8 additions and 0 deletions
  1. 3 0
      src/scripts/boot.lua
  2. 5 0
      src/scripts/boot.lua.h

+ 3 - 0
src/scripts/boot.lua

@@ -584,6 +584,9 @@ function love.errhand(msg)
 		love.mouse.setVisible(true)
 		love.mouse.setGrabbed(false)
 		love.mouse.setRelativeMode(false)
+		if love.mouse.hasCursor() then
+			love.mouse.setCursor()
+		end
 	end
 	if love.joystick then
 		-- Stop all joystick vibrations.

+ 5 - 0
src/scripts/boot.lua.h

@@ -1064,6 +1064,11 @@ const unsigned char boot_lua[] =
 	0x61, 0x62, 0x62, 0x65, 0x64, 0x28, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x0a,
 	0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x52, 0x65, 
 	0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x28, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x0a,
+	0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x68, 0x61, 
+	0x73, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x28, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
+	0x09, 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x43, 
+	0x75, 0x72, 0x73, 0x6f, 0x72, 0x28, 0x29, 0x0a,
+	0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6a, 0x6f, 0x79, 0x73, 0x74, 0x69, 0x63, 0x6b, 0x20, 
 	0x74, 0x68, 0x65, 0x6e, 0x0a,