Update embed_util.cc
This commit is contained in:
恍兮惚兮 2024-03-23 16:40:52 +08:00
parent db7cae083a
commit 3f255bbd26
3 changed files with 4 additions and 2 deletions

View File

@ -187,7 +187,7 @@ bool check_is_thread_selected(const ThreadParam& tp){
return false;
}
bool check_embed_able(const ThreadParam& tp){
return hostconnected&&check_is_thread_selected(tp)&&(isPauseKeyPressed()==false);
return hostconnected&&check_is_thread_selected(tp)&&((isPauseKeyPressed()==false)?true:!embedsharedmem->fastskipignore);
}
bool waitforevent(UINT32 timems,const ThreadParam& tp,const std::wstring &origin){
char eventname[1000];

View File

@ -144,7 +144,7 @@ C_LUNA_API void Luna_FindHooks_waiting(int* count){
for (int lastSize = 0; *count == 0 || *count != lastSize; Sleep(2000)) lastSize = *count;
delete count;
}
C_LUNA_API void Luna_EmbedSettings(DWORD pid,UINT32 waittime,UINT8 fontCharSet,bool fontCharSetEnabled,wchar_t *fontFamily,UINT32 spaceadjustpolicy,UINT32 keeprawtext){
C_LUNA_API void Luna_EmbedSettings(DWORD pid,UINT32 waittime,UINT8 fontCharSet,bool fontCharSetEnabled,wchar_t *fontFamily,UINT32 spaceadjustpolicy,UINT32 keeprawtext,bool fastskipignore){
auto sm=Host::GetEmbedSharedMem(pid);
if(!sm)return;
sm->waittime=waittime;
@ -153,6 +153,7 @@ C_LUNA_API void Luna_EmbedSettings(DWORD pid,UINT32 waittime,UINT8 fontCharSet,b
wcscpy_s(sm->fontFamily,100,fontFamily);
sm->spaceadjustpolicy=spaceadjustpolicy;
sm->keeprawtext=keeprawtext;
sm->fastskipignore=fastskipignore;
}
C_LUNA_API bool Luna_checkisusingembed(DWORD pid,uint64_t address,uint64_t ctx1,uint64_t ctx2){
auto sm=Host::GetEmbedSharedMem(pid);

View File

@ -35,6 +35,7 @@ struct EmbedSharedMem{
UINT8 fontCharSet;
wchar_t fontFamily[100];
UINT codepage;
bool fastskipignore;
};
class TextHook
{