Fix regression in THPS2X: Needs re-testing with Panzer Dragoon Orta
This commit is contained in:
parent
f0f63f9e16
commit
6afb63ac77
|
@ -149,23 +149,6 @@ static unsigned int WINAPI PCSTProxy
|
|||
// Suspend right before calling the thread notification routines
|
||||
SuspendThread(GetCurrentThread());
|
||||
|
||||
// call thread notification routine(s)
|
||||
if (g_iThreadNotificationCount != 0)
|
||||
{
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
XTL::XTHREAD_NOTIFY_PROC pfnNotificationRoutine = (XTL::XTHREAD_NOTIFY_PROC)g_pfnThreadNotification[i];
|
||||
|
||||
// If the routine doesn't exist, don't execute it!
|
||||
if (pfnNotificationRoutine == NULL)
|
||||
continue;
|
||||
|
||||
DBG_PRINTF("Calling pfnNotificationRoutine[%d] (0x%.8X)\n", g_iThreadNotificationCount, pfnNotificationRoutine);
|
||||
|
||||
pfnNotificationRoutine(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
// use the special calling convention
|
||||
__try
|
||||
{
|
||||
|
@ -319,8 +302,8 @@ XBSYSAPI EXPORTNUM(255) xboxkrnl::NTSTATUS NTAPI xboxkrnl::PsCreateSystemThreadE
|
|||
iPCSTProxyParam->StartContext = StartContext;
|
||||
iPCSTProxyParam->SystemRoutine = SystemRoutine; // NULL, XapiThreadStartup or unknown?
|
||||
iPCSTProxyParam->StartSuspended = CreateSuspended;
|
||||
iPCSTProxyParam->hStartedEvent = hStartedEvent;
|
||||
|
||||
iPCSTProxyParam->hStartedEvent = hStartedEvent;
|
||||
|
||||
*ThreadHandle = (HANDLE)_beginthreadex(NULL, KernelStackSize, PCSTProxy, iPCSTProxyParam, NULL, (uint*)&dwThreadId);
|
||||
// Note : DO NOT use iPCSTProxyParam anymore, since ownership is transferred to the proxy (which frees it too)
|
||||
|
||||
|
@ -349,6 +332,23 @@ XBSYSAPI EXPORTNUM(255) xboxkrnl::NTSTATUS NTAPI xboxkrnl::PsCreateSystemThreadE
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// call thread notification routine(s)
|
||||
if (g_iThreadNotificationCount != 0)
|
||||
{
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
XTL::XTHREAD_NOTIFY_PROC pfnNotificationRoutine = (XTL::XTHREAD_NOTIFY_PROC)g_pfnThreadNotification[i];
|
||||
|
||||
// If the routine doesn't exist, don't execute it!
|
||||
if (pfnNotificationRoutine == NULL)
|
||||
continue;
|
||||
|
||||
DBG_PRINTF("Calling pfnNotificationRoutine[%d] (0x%.8X)\n", g_iThreadNotificationCount, pfnNotificationRoutine);
|
||||
|
||||
pfnNotificationRoutine(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
// Release the event
|
||||
CloseHandle(hStartedEvent);
|
||||
|
@ -367,7 +367,7 @@ XBSYSAPI EXPORTNUM(255) xboxkrnl::NTSTATUS NTAPI xboxkrnl::PsCreateSystemThreadE
|
|||
}
|
||||
|
||||
// ******************************************************************
|
||||
// * 0x0100 - PsQueryStatistics()
|
||||
// * 0x0100 - PsQueryStatisti cs()
|
||||
// ******************************************************************
|
||||
XBSYSAPI EXPORTNUM(256) xboxkrnl::NTSTATUS NTAPI xboxkrnl::PsQueryStatistics
|
||||
(
|
||||
|
|
|
@ -358,7 +358,7 @@ bool TitleIsLegoSW()
|
|||
|
||||
pTitleId++;
|
||||
}
|
||||
|
||||
|
||||
if (result) {
|
||||
EmuLog(LOG_LEVEL::WARNING, "Applying Lego Star Wars Hack");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue