don't probe pump pads that aren't there

This commit is contained in:
Glenn Maynard
2003-02-20 21:42:08 +00:00
parent 848ad6e2be
commit d9ad14bbaf
@@ -146,6 +146,9 @@ InputHandler_Win32_Pump::~InputHandler_Win32_Pump()
int InputHandler_Win32_Pump::dev_t::GetPadEvent()
{
if(h == INVALID_HANDLE_VALUE)
return -1;
int ret;
if(!pending)
@@ -173,7 +176,9 @@ int InputHandler_Win32_Pump::dev_t::GetPadEvent()
if(ret == 0) {
// this prints too much info in Win98
// LOG->Warn(werr_ssprintf(GetLastError(), "Error reading Pump pad"));
// See if it's fixed--h should be INVALID_HANDLE_VALUE if
// the pad isn't there. -glenn
LOG->Warn(werr_ssprintf(GetLastError(), "Error reading Pump pad"));
return -1;
}