From d29b85efe50aa9b8c8e21593331efef9c28d4d1b Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 19 Dec 2005 12:04:58 +0000 Subject: [PATCH] fix bogus assert firing when no hid devices attached --- stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp b/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp index 7c2ef604bb..87c03d524d 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -71,7 +71,8 @@ static int GetNumUsbHidDevices() { int i = 0; bool b = RegistryAccess::GetRegValue( "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\HidUsb\\Enum", "Count", i ); - ASSERT( b ); + // The "Enum" key doesn't exist if no hid devices are attached, so it's expected that GetRegValue will sometimes fail. + // TODO: Does this work in Win98 and Win2K? return i; }