Fix an issue where g_CPUOthers was being used before being set.

This commit is contained in:
Luke Usher 2017-01-04 06:52:57 +00:00
parent 2fa170a96c
commit 4f2e4511d8
1 changed files with 17 additions and 16 deletions

View File

@ -563,23 +563,7 @@ extern "C" CXBXKRNL_API void CxbxKrnlInit
//extern void InitializeSectionStructures(void);
InitializeSectionStructures();
DbgPrintf("EmuMain (0x%X): Initializing Direct3D.\n", GetCurrentThreadId());
XTL::EmuD3DInit(pXbeHeader, dwXbeHeaderSize);
EmuHLEIntercept(pLibraryVersion, pXbeHeader);
//
// initialize FS segment selector
//
{
EmuInitFS();
EmuGenerateFS(pTLS, pTLSData);
}
DbgPrintf("EmuMain : Determining CPU affinity.\n");
// Make sure the Xbox1 code runs on one core (as the box itself has only 1 CPU,
@ -602,6 +586,23 @@ extern "C" CXBXKRNL_API void CxbxKrnlInit
SetThreadAffinityMask(GetCurrentThread(), g_CPUXbox);
}
DbgPrintf("EmuMain (0x%X): Initializing Direct3D.\n", GetCurrentThreadId());
XTL::EmuD3DInit(pXbeHeader, dwXbeHeaderSize);
EmuHLEIntercept(pLibraryVersion, pXbeHeader);
//
// initialize FS segment selector
//
{
EmuInitFS();
EmuGenerateFS(pTLS, pTLSData);
}
DbgPrintf("EmuMain (0x%X): Initial thread starting.\n", GetCurrentThreadId());
CxbxLaunchXbe(Entry);