HOTFIX: fix module unloading with SRFIX_DISABLE

This commit is contained in:
mkrsym1 2023-06-21 15:41:46 +03:00
parent 14c90f7137
commit f26bcbd0fc

View File

@ -52,7 +52,8 @@ static void _unityplayer_callback(HMODULE unityModule) {
}
// Remove dependency on shared resources by patching WriteTextureStatisticUserData
unload_ctr_inc();
wtsud_patch_addr = ((char*)unityModule) + 0x16430;
DWORD oldProtect;
@ -98,6 +99,5 @@ void hsr_fill_data(struct game_data *buf) {
buf->tp6_section_name = HSR_TP6_SECTION_NAME;
buf->tvm_section_name = HSR_TVM_SECTION_NAME;
unload_ctr_inc();
buf->unityplayer_callback = &_unityplayer_callback;
}