Update CMakeLists.txt
This commit is contained in:
恍兮惚兮 2024-04-25 11:35:21 +08:00
parent 779691b61a
commit 1fdcbb1535
3 changed files with 4 additions and 1 deletions

View File

@ -55,7 +55,7 @@ include(generate_product_version)
set(VERSION_MAJOR 3) set(VERSION_MAJOR 3)
set(VERSION_MINOR 1) set(VERSION_MINOR 1)
set(VERSION_PATCH 0) set(VERSION_PATCH 1)
set(VERSION_REVISION 0) set(VERSION_REVISION 0)
add_subdirectory(include) add_subdirectory(include)

View File

@ -41,6 +41,7 @@ void LunaHost::on_close(){
for(auto pid:attachedprocess){ for(auto pid:attachedprocess){
Host::DetachProcess(pid); Host::DetachProcess(pid);
} }
hasstoped=true;
if(attachedprocess.size()) if(attachedprocess.size())
std::this_thread::sleep_for(std::chrono::milliseconds(100)); std::this_thread::sleep_for(std::chrono::milliseconds(100));
} }
@ -393,6 +394,7 @@ void LunaHost::updatelisttext(const std::wstring&text,LONG_PTR data){
} }
} }
bool LunaHost::on_text_recv(TextThread& thread, std::wstring& output){ bool LunaHost::on_text_recv(TextThread& thread, std::wstring& output){
if(hasstoped)return true;
std::lock_guard _(settextmutex); std::lock_guard _(settextmutex);
on_text_recv_checkissaved(thread); on_text_recv_checkissaved(thread);
if(!plugins->dispatch(thread,output))return false; if(!plugins->dispatch(thread,output))return false;

View File

@ -96,6 +96,7 @@ class LunaHost:public mainwindow{
Settingwindow *settingwindow=0; Settingwindow *settingwindow=0;
Pluginmanager* plugins; Pluginmanager* plugins;
Hooksearchwindow * hooksearchwindow=0; Hooksearchwindow * hooksearchwindow=0;
bool hasstoped=false;
bool on_text_recv(TextThread& thread, std::wstring& sentence); bool on_text_recv(TextThread& thread, std::wstring& sentence);
void on_text_recv_checkissaved(TextThread& thread); void on_text_recv_checkissaved(TextThread& thread);
void on_thread_create(TextThread& thread); void on_thread_create(TextThread& thread);