Update EmuXapi.cpp
This commit is contained in:
parent
0e0d41081a
commit
52afb76239
|
@ -191,26 +191,7 @@ BOOL WINAPI XTL::EMUPATCH(XGetDeviceChanges)
|
||||||
LOG_FUNC_END;
|
LOG_FUNC_END;
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue