diff --git a/src/CxbxKrnl/CxbxKrnl.cpp b/src/CxbxKrnl/CxbxKrnl.cpp index af0604149..7106ef2d0 100644 --- a/src/CxbxKrnl/CxbxKrnl.cpp +++ b/src/CxbxKrnl/CxbxKrnl.cpp @@ -641,8 +641,12 @@ void CxbxKrnlInit CxbxKrnl_hEmuParent = IsWindow(hwndParent) ? hwndParent : NULL; CxbxKrnl_DebugMode = DbgMode; CxbxKrnl_DebugFileName = (char*)szDebugFilename; + + // A patch to dwCertificateAddr is a requirement due to Windows TLS is overwriting dwGameRegion data address. + // By using unalternated certificate data, it should no longer cause any problem with titles running and Cxbx's log as well. CxbxKrnl_XbeHeader->dwCertificateAddr = (uint32)&CxbxKrnl_Xbe->m_Certificate; g_pCertificate = &CxbxKrnl_Xbe->m_Certificate; + // for unicode conversions setlocale(LC_ALL, "English"); g_CurrentProcessHandle = GetCurrentProcess(); diff --git a/src/CxbxKrnl/EmuDSound.cpp b/src/CxbxKrnl/EmuDSound.cpp index c60b9cad0..d756923b8 100755 --- a/src/CxbxKrnl/EmuDSound.cpp +++ b/src/CxbxKrnl/EmuDSound.cpp @@ -104,12 +104,9 @@ XTL::X_XFileMediaObject::_vtbl XTL::X_XFileMediaObject::vtbl = }; -/* TODO Task list: - * * Need implement support for DirectSound3DListener in primary buffer - * ** Need proper DirectSoundBuffer created after DirectSoundCreate function - * ** etc... - * * Need to extract whole DSound lib section out of xbe and start matching all functions including one missings. - * ** Do this with 3+ xbe files with same versioning on DSound only +/* NOTE: SUCCEEDED define is only checking for is equal or greater than zero value. + And FAILED check for less than zero value. Since DS_OK is only 0 base on DirectSound documentation, + there is chance of failure which contain value greater than 0. */