From 7c1707c7de8be3584fc5f740fd63037d7acaa6b9 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 23 Aug 2022 07:58:24 -0600 Subject: [PATCH] Ignore some ps2 init errors to improve compatibility --- ps2d/src/controller.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ps2d/src/controller.rs b/ps2d/src/controller.rs index b6bd05cf28..3fbe16ea1a 100644 --- a/ps2d/src/controller.rs +++ b/ps2d/src/controller.rs @@ -286,7 +286,7 @@ impl Ps2 { // Reset keyboard b = self.keyboard_command(KeyboardCommand::Reset)?; if b == 0xFA { - b = self.read()?; + b = self.read().unwrap_or(0); if b != 0xAA { eprintln!("ps2d: keyboard failed self test: {:02X}", b); } @@ -334,17 +334,17 @@ impl Ps2 { b = x.read()?; if b != 0xAA { eprintln!("ps2d: mouse failed self test 1: {:02X}", b); - return Err(Error::CommandRetry); + //return Err(Error::CommandRetry); } b = x.read()?; if b != 0x00 { eprintln!("ps2d: mouse failed self test 2: {:02X}", b); - return Err(Error::CommandRetry); + //return Err(Error::CommandRetry); } } else { eprintln!("ps2d: mouse failed to reset: {:02X}", b); - return Err(Error::CommandRetry); + //return Err(Error::CommandRetry); } // Clear remaining data