Skip to content

Commit

Permalink
Compatibility with wine.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamepiaynmo committed Mar 5, 2021
1 parent 6d9d906 commit c0522f7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions BML.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<SupportJustMyCode>false</SupportJustMyCode>
<LanguageStandard>stdcpplatest</LanguageStandard>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
2 changes: 1 addition & 1 deletion BuildVer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define BML_MAJOR_VER 0
#define BML_MINOR_VER 3
#define BML_BUILD_VER 32
#define BML_BUILD_VER 33
8 changes: 7 additions & 1 deletion ModLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ void ModLoader::Init() {

m_logger->Info("Step Hook created");

#ifdef _DEBUG
m_logger->Info("Player.exe Address: 0x%08x", GetModuleHandle("Player.exe"));
m_logger->Info("CK2.dll Address: 0x%08x", GetModuleHandle("CK2.dll"));
m_logger->Info("VxMath.dll Address: 0x%08x", GetModuleHandle("VxMath.dll"));
#endif

HMODULE narratives = GetModuleHandle("Narratives.dll");
if (narratives == nullptr) {
m_logger->Error("Get Narratives Address Failed");
Expand Down Expand Up @@ -212,7 +218,7 @@ CKERROR Player::Process() {

// Render Tick
CKERROR Player::Render(CK_RENDER_FLAGS flags) {
CKERROR result = ModLoader::m_instance->GetRenderContext()->Render(flags);
CKERROR result = ModLoader::m_instance->GetCKContext()->GetPlayerRenderContext()->Render(flags);
ModLoader::m_instance->Render(flags, result);
return result;
}
Expand Down

0 comments on commit c0522f7

Please sign in to comment.