mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-22 02:45:49 -04:00
put WindowFontCacheFix behind forward compat check
This commit is contained in:
parent
7f86f7c7f3
commit
c5921ff098
1 changed files with 5 additions and 3 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
|
||||
#include <loader/LoaderImpl.hpp>
|
||||
|
||||
using namespace geode::prelude;
|
||||
|
||||
// https://github.com/cocos2d/cocos2d-x/blob/5a25fe75cb8b26b61b14b070e757ec3b17ff7791/cocos2dx/platform/win32/CCImage.cpp#L96
|
||||
|
@ -33,14 +35,14 @@ static void patchCall(uintptr_t addr, uintptr_t newCall) {
|
|||
}
|
||||
|
||||
$execute {
|
||||
|
||||
if (LoaderImpl::get()->isForwardCompatMode()) return;
|
||||
|
||||
// BitmapDC::~BitmapDC
|
||||
patchCall(0xC9A56, (uintptr_t)&RemoveFontResourceWHook);
|
||||
|
||||
// BitmapDC::setFont
|
||||
patchCall(0xCB5BC, (uintptr_t)&RemoveFontResourceWHook);
|
||||
patchCall(0xCB642, (uintptr_t)&AddFontResourceWHook);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue