mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-26 23:24:13 +08:00
fix
This commit is contained in:
parent
91cd3dfe5e
commit
2fdd5621ec
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
LunaTranslator/userconfig
|
||||
LunaTranslator/userconfig1
|
||||
|
||||
lunatranslator/cache
|
||||
*.pyc
|
||||
|
@ -662,12 +662,13 @@ class MAINUI:
|
||||
found = findgameuidofpath(pexe)
|
||||
if found:
|
||||
gameuid, reflist = found
|
||||
else:
|
||||
gameuid = find_or_create_uid(savehook_new_list, pexe, title)
|
||||
reflist = savehook_new_list
|
||||
if globalconfig["startgamenototop"] == False:
|
||||
idx = reflist.index(gameuid)
|
||||
reflist.insert(0, reflist.pop(idx))
|
||||
else:
|
||||
gameuid = find_or_create_uid(savehook_new_list, pexe, title)
|
||||
savehook_new_list.insert(0, gameuid)
|
||||
|
||||
self.textsource = texthook(pids, hwnd, pexe, gameuid, autostart=False)
|
||||
self.textsource.start()
|
||||
|
||||
|
@ -383,7 +383,7 @@ class hookselect(closeashidewindow):
|
||||
addnewhooksignal = pyqtSignal(tuple, bool)
|
||||
getnewsentencesignal = pyqtSignal(str)
|
||||
sysmessagesignal = pyqtSignal(str)
|
||||
changeprocessclearsignal = pyqtSignal(dict)
|
||||
changeprocessclearsignal = pyqtSignal()
|
||||
removehooksignal = pyqtSignal(tuple)
|
||||
getfoundhooksignal = pyqtSignal(dict)
|
||||
update_item_new_line = pyqtSignal(tuple, str)
|
||||
@ -444,7 +444,7 @@ class hookselect(closeashidewindow):
|
||||
1, QHeaderView.ResizeMode.ResizeToContents
|
||||
)
|
||||
|
||||
def changeprocessclear(self, config):
|
||||
def changeprocessclear(self):
|
||||
# self.ttCombo.clear()
|
||||
self.ttCombomodelmodel.clear()
|
||||
self.save = []
|
||||
|
@ -86,6 +86,8 @@ EmbedCallback = CFUNCTYPE(None, c_wchar_p, ThreadParam)
|
||||
|
||||
|
||||
class texthook(basetext):
|
||||
autofindpids = False
|
||||
|
||||
@property
|
||||
def config(self):
|
||||
if savehook_new_data[self.gameuid]["hooksetting_follow_default"]:
|
||||
@ -135,7 +137,7 @@ class texthook(basetext):
|
||||
self.pids = pids
|
||||
self.is64bit = Is64bit(pids[0])
|
||||
self.hwnd = hwnd
|
||||
gobject.baseobject.hookselectdialog.changeprocessclearsignal.emit(self.config)
|
||||
gobject.baseobject.hookselectdialog.changeprocessclearsignal.emit()
|
||||
self.isremoveuseless = self.config["removeuseless"] and len(
|
||||
self.autostarthookcode
|
||||
)
|
||||
|
@ -53,6 +53,8 @@ class hwndchecker:
|
||||
|
||||
|
||||
class basetext:
|
||||
autofindpids = True
|
||||
|
||||
@property
|
||||
def hwnd(self):
|
||||
|
||||
@ -65,6 +67,7 @@ class basetext:
|
||||
if self.__hwnd:
|
||||
self.__hwnd.end = True
|
||||
self.__hwnd = None
|
||||
if self.autofindpids:
|
||||
self.pids = []
|
||||
self.gameuid = None
|
||||
self.md5 = "0"
|
||||
@ -73,6 +76,8 @@ class basetext:
|
||||
|
||||
self.__hwnd = hwndchecker(_hwnd, self)
|
||||
|
||||
if not self.autofindpids:
|
||||
return
|
||||
self.pids = [windows.GetWindowThreadProcessId(_hwnd)]
|
||||
gameuid = findgameuidofpath(getpidexe(self.pids[0]))
|
||||
if gameuid:
|
||||
|
@ -29,7 +29,7 @@ include(generate_product_version)
|
||||
|
||||
set(VERSION_MAJOR 5)
|
||||
set(VERSION_MINOR 26)
|
||||
set(VERSION_PATCH 9)
|
||||
set(VERSION_PATCH 10)
|
||||
|
||||
add_library(pch pch.cpp)
|
||||
target_precompile_headers(pch PUBLIC pch.h)
|
||||
|
Loading…
x
Reference in New Issue
Block a user