From fd3e770fdff3f68055e5d407c15065e5084c3db3 Mon Sep 17 00:00:00 2001 From: Raphael Assenat Date: Fri, 4 Dec 2015 23:06:18 -0500 Subject: [PATCH] Fix wavebird detection --- gcn64_protocol.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gcn64_protocol.c b/gcn64_protocol.c index ce324ec..1b4f3c4 100644 --- a/gcn64_protocol.c +++ b/gcn64_protocol.c @@ -164,19 +164,17 @@ int gcn64_detectController(void) * 0xa800 Wavebird * 0xebb0 Wavebird * - * This last entry worries me. I never observed it, but who knows - * what the user will connect? Better be safe and consider 0xb as - * a gamecube controller too. - * - * */ + **/ id = (data[0]<<8) | data[1]; + printf("Id: %04x (%d: %02x %02x %02x)\r\n", id, count, data[0], data[1], data[2]); + #ifdef FORCE_KEYBOARD return CONTROLLER_IS_GC_KEYBOARD; #endif - switch (id >> 8) { + switch ((id >> 8) & 0x0F) { case 0x05: return CONTROLLER_IS_N64;