JSRF Hack: Prevent crash after XGetDeviceChanges

This commit is contained in:
Luke Usher 2017-05-28 16:31:55 +01:00
parent 82c19073f8
commit 4d75a6c79d
1 changed files with 11 additions and 0 deletions

View File

@ -193,6 +193,17 @@ BOOL WINAPI XTL::EMUPATCH(XGetDeviceChanges)
BOOL ret = FALSE;
// JSRF Hack: Always return no device changes
// 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
// TitleID 0x49470018 = JSRF NTSC-U
// TitleID 0x5345000A = JSRF PAL
// ~Luke Usher
Xbe::Certificate *pCertificate = (Xbe::Certificate*)CxbxKrnl_XbeHeader->dwCertificateAddr;
if (pCertificate->dwTitleId == 0x49470018 || pCertificate->dwTitleId == 0x5345000A) {
RETURN(ret);
}
// If we have no connected devices, report one insertion
if (DeviceType->CurrentConnected == 0) {
*pdwInsertions = 1;