Update EmuXapi.cpp

This commit is contained in:
ergo720 2017-08-31 20:30:17 +00:00 committed by Luke Usher
parent 0e0d41081a
commit 52afb76239
1 changed files with 22 additions and 21 deletions

View File

@ -192,25 +192,6 @@ BOOL WINAPI XTL::EMUPATCH(XGetDeviceChanges)
BOOL ret = FALSE; BOOL ret = FALSE;
if(!DeviceType->ChangeConnected)
{
*pdwInsertions = 0;
*pdwRemovals = 0;
}
else
{
*pdwInsertions = (DeviceType->CurrentConnected & ~DeviceType->PreviousConnected);
*pdwRemovals = (DeviceType->PreviousConnected & ~DeviceType->CurrentConnected);
ULONG RemoveInsert = DeviceType->ChangeConnected &
DeviceType->CurrentConnected &
DeviceType->PreviousConnected;
*pdwRemovals |= RemoveInsert;
*pdwInsertions |= RemoveInsert;
DeviceType->ChangeConnected = 0;
DeviceType->PreviousConnected = DeviceType->CurrentConnected;
ret = (*pdwInsertions | *pdwRemovals) ? TRUE : FALSE;
}
/*
// JSRF Hack: Always return no device changes // JSRF Hack: Always return no device changes
// Without this, JSRF hard crashes sometime after calling this function // Without this, JSRF hard crashes sometime after calling this function
// I HATE game specific hacks, but I've wasted three weeks trying to solve this already // I HATE game specific hacks, but I've wasted three weeks trying to solve this already
@ -233,7 +214,27 @@ BOOL WINAPI XTL::EMUPATCH(XGetDeviceChanges)
} }
*pdwRemovals = 0; *pdwRemovals = 0;
*/
/*
if(!DeviceType->ChangeConnected)
{
*pdwInsertions = 0;
*pdwRemovals = 0;
}
else
{
*pdwInsertions = (DeviceType->CurrentConnected & ~DeviceType->PreviousConnected);
*pdwRemovals = (DeviceType->PreviousConnected & ~DeviceType->CurrentConnected);
ULONG RemoveInsert = DeviceType->ChangeConnected &
DeviceType->CurrentConnected &
DeviceType->PreviousConnected;
*pdwRemovals |= RemoveInsert;
*pdwInsertions |= RemoveInsert;
DeviceType->ChangeConnected = 0;
DeviceType->PreviousConnected = DeviceType->CurrentConnected;
ret = (*pdwInsertions | *pdwRemovals) ? TRUE : FALSE;
}
*/
RETURN(ret); RETURN(ret);
} }