mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-12-25 20:54:15 +08:00
Update pluginmanager.cpp
This commit is contained in:
parent
c94547bbc9
commit
c93e98a567
@ -211,9 +211,12 @@ void Pluginmanager::remove(const std::wstring& wss,bool onlyload){
|
||||
}
|
||||
else
|
||||
FreeLibrary(hm);
|
||||
OnNewSentenceS[wss].funcptr=OnNewSentenceS[wss].hmodule=0;
|
||||
|
||||
|
||||
if(onlyload)return;
|
||||
if(onlyload){
|
||||
OnNewSentenceS[wss].funcptr=OnNewSentenceS[wss].hmodule=0;
|
||||
return;
|
||||
}
|
||||
auto s=WideStringToString(wss);
|
||||
auto &plgs=configs->configs["plugins"];
|
||||
auto it=std::remove_if(plgs.begin(),plgs.end(),[&](auto&t){
|
||||
@ -221,6 +224,7 @@ void Pluginmanager::remove(const std::wstring& wss,bool onlyload){
|
||||
return p==s;
|
||||
});
|
||||
plgs.erase(it, plgs.end());
|
||||
OnNewSentenceS.erase(wss);
|
||||
}
|
||||
std::optional<std::wstring>Pluginmanager::selectpluginfile(){
|
||||
return SelectFile(0,L"Plugin Files\0*.dll;*.xdll\0");
|
||||
|
Loading…
x
Reference in New Issue
Block a user