mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-23 13:55:36 +08:00
fix
This commit is contained in:
parent
f0bbae9df9
commit
a2a287002d
@ -145,21 +145,18 @@ uintptr_t queryrelativeret(uintptr_t retaddr){
|
|||||||
return relative;
|
return relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
void jitfunctiontext_fun(hook_stack* stack, HookParam* hp, uintptr_t* data, uintptr_t* split, size_t* len){
|
uintptr_t jitgetaddr(hook_stack* stack, HookParam* hp){
|
||||||
switch (hp->jittype)
|
switch (hp->jittype)
|
||||||
{
|
{
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
case JITTYPE::YUZU:
|
case JITTYPE::YUZU:
|
||||||
*data=YUZU::emu_arg(stack)[hp->argidx]+hp->padding;
|
return YUZU::emu_arg(stack)[hp->argidx]+hp->padding;
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
case JITTYPE::PPSSPP:
|
case JITTYPE::PPSSPP:
|
||||||
*data=PPSSPP::emu_arg(stack)[hp->argidx]+hp->padding;
|
return PPSSPP::emu_arg(stack)[hp->argidx]+hp->padding;
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
*data=0;
|
return 0;
|
||||||
}
|
}
|
||||||
*len=HookStrLen(hp,(BYTE*)*data);
|
|
||||||
}
|
}
|
||||||
void TextHook::Send(uintptr_t lpDataBase)
|
void TextHook::Send(uintptr_t lpDataBase)
|
||||||
{
|
{
|
||||||
@ -183,6 +180,11 @@ void TextHook::Send(uintptr_t lpDataBase)
|
|||||||
plpdatain=(lpDataBase + hp.offset),
|
plpdatain=(lpDataBase + hp.offset),
|
||||||
lpDataIn=*(uintptr_t*)plpdatain;
|
lpDataIn=*(uintptr_t*)plpdatain;
|
||||||
bool isstring=false;
|
bool isstring=false;
|
||||||
|
if(hp.jittype!=JITTYPE::PC)
|
||||||
|
{
|
||||||
|
lpDataIn=jitgetaddr(stack,&hp);
|
||||||
|
plpdatain=(uintptr_t)&lpDataIn;
|
||||||
|
}
|
||||||
|
|
||||||
auto use_custom_embed_fun=(hp.type&EMBED_ABLE)&&!(hp.type&EMBED_BEFORE_SIMPLE);
|
auto use_custom_embed_fun=(hp.type&EMBED_ABLE)&&!(hp.type&EMBED_BEFORE_SIMPLE);
|
||||||
if(use_custom_embed_fun)
|
if(use_custom_embed_fun)
|
||||||
@ -196,10 +198,6 @@ void TextHook::Send(uintptr_t lpDataBase)
|
|||||||
isstring=true;
|
isstring=true;
|
||||||
hp.text_fun(stack, &hp, &lpDataIn, &lpSplit, &lpCount);
|
hp.text_fun(stack, &hp, &lpDataIn, &lpSplit, &lpCount);
|
||||||
}
|
}
|
||||||
else if(hp.jittype!=JITTYPE::PC){
|
|
||||||
isstring=true;
|
|
||||||
jitfunctiontext_fun(stack, &hp, &lpDataIn, &lpSplit, &lpCount);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (hp.type & FIXING_SPLIT) lpSplit = FIXED_SPLIT_VALUE; // fuse all threads, and prevent floating
|
if (hp.type & FIXING_SPLIT) lpSplit = FIXED_SPLIT_VALUE; // fuse all threads, and prevent floating
|
||||||
|
@ -304,7 +304,7 @@ namespace
|
|||||||
|
|
||||||
if (hp.type & NO_CONTEXT) HCode += L'N';
|
if (hp.type & NO_CONTEXT) HCode += L'N';
|
||||||
|
|
||||||
if (hp.codepage != 0 && !(hp.type & CODEC_UTF8) ) HCode += std::to_wstring(hp.codepage) + L'#';
|
if (hp.codepage != 0 && !(hp.type & CODEC_UTF8)&&!(hp.type & CODEC_UTF16)&&!(hp.type & CODEC_UTF32) ) HCode += std::to_wstring(hp.codepage) + L'#';
|
||||||
|
|
||||||
if (hp.padding) HCode += HexString(hp.padding) + L'+';
|
if (hp.padding) HCode += HexString(hp.padding) + L'+';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user