The unified diff between revisions [1d4ae400..] and [f288316d..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'src/lsi/mouse.c'

#
# old_revision [1d4ae4008aec662f233d25ffbefdd8ebe233e48e]
# new_revision [f288316da9714d1e11a3979cf3854e3cd99b5cb4]
#
# patch "src/lsi/mouse.c"
#  from [d0ae140c88791f0131a6ddef426113cde6f3955b]
#    to [410738f63d15db286b591fff6040fcdfe9e1cfa6]
#
============================================================
--- src/lsi/mouse.c	d0ae140c88791f0131a6ddef426113cde6f3955b
+++ src/lsi/mouse.c	410738f63d15db286b591fff6040fcdfe9e1cfa6
@@ -52,15 +52,20 @@ int mouse_init(void)
 
 int mouse_init(void)
 {
+	mouse_x = 0;
+	mouse_y = 0;
+	mouse_z = 0;
+	mouse_bytes = 0;
+
 	mouse_fd = open(MOUSEDEVICE, O_RDONLY);
-	if (mouse_fd < 0)
-		err(1, "can't open mouse device");
+	if (mouse_fd < 0) {
+		warn("can't open mouse device");
+		mouse_initialised = 0;
+		return 0;
+	}
 
 	vm_register_signal_fd(mouse_fd, VM_MOUSEQ);
 	mouse_initialised = 1;
-	mouse_x = 0;
-	mouse_y = 0;
-	mouse_z = 0;
 
 	return 1;
 }