Use XBE's original Certificate Data

It does fix Game Region reported by @jarupxx. It is likely other values
may have overwritten as well in the process. Using unalternated
certificate data instead.
This commit is contained in:
RadWolfie 2017-10-25 16:12:18 -05:00
parent 61b54bba41
commit 733a4a83f0
1 changed files with 2 additions and 1 deletions

View File

@ -641,7 +641,8 @@ void CxbxKrnlInit
CxbxKrnl_hEmuParent = IsWindow(hwndParent) ? hwndParent : NULL;
CxbxKrnl_DebugMode = DbgMode;
CxbxKrnl_DebugFileName = (char*)szDebugFilename;
g_pCertificate = (Xbe::Certificate *)(CxbxKrnl_XbeHeader->dwCertificateAddr);
CxbxKrnl_XbeHeader->dwCertificateAddr = (uint32)&CxbxKrnl_Xbe->m_Certificate;
g_pCertificate = &CxbxKrnl_Xbe->m_Certificate;
// for unicode conversions
setlocale(LC_ALL, "English");
g_CurrentProcessHandle = GetCurrentProcess();