mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-23 22:05:36 +08:00
Update python.cpp
This commit is contained in:
parent
1af117fea5
commit
f9c203a816
@ -84,16 +84,13 @@ std::unordered_map<std::wstring, std::wstring> loadfontfiles() {
|
|||||||
|
|
||||||
auto lpLogfonts = std::make_unique<LOGFONTW[]>(dwFontsLoaded);
|
auto lpLogfonts = std::make_unique<LOGFONTW[]>(dwFontsLoaded);
|
||||||
DWORD cbBuffer = dwFontsLoaded * sizeof(LOGFONTW);
|
DWORD cbBuffer = dwFontsLoaded * sizeof(LOGFONTW);
|
||||||
if (!GetFontResourceInfo(fontfile.c_str(), &cbBuffer, lpLogfonts.get(), QFR_LOGFONT)) {
|
auto succ=GetFontResourceInfo(fontfile.c_str(), &cbBuffer, lpLogfonts.get(), QFR_LOGFONT);
|
||||||
RemoveFontResourceExW(fontfile.c_str(), FR_PRIVATE, 0);
|
RemoveFontResourceExW(fontfile.c_str(), FR_PRIVATE, 0);
|
||||||
continue;
|
if (!succ)continue;
|
||||||
}
|
|
||||||
for (int k = 0; k < dwFontsLoaded; k++)
|
for (int k = 0; k < dwFontsLoaded; k++)
|
||||||
fntss[i].insert(std::make_pair(lpLogfonts[k].lfFaceName, fontfile));
|
fntss[i].insert(std::make_pair(lpLogfonts[k].lfFaceName, fontfile));
|
||||||
RemoveFontResourceExW(fontfile.c_str(), FR_PRIVATE, 0);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
for (int i = 0; i < LOADFONTTHREADNUM; i++) {
|
for (int i = 0; i < LOADFONTTHREADNUM; i++) {
|
||||||
ts.emplace_back(std::thread(singletask,i));
|
ts.emplace_back(std::thread(singletask,i));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user