Instance check on windows: concider whole window name when searching for another instance

This commit is contained in:
David Kocik 2020-11-25 12:28:10 +01:00
parent 9d71597e05
commit 3d78ae9271

View File

@ -79,7 +79,7 @@ namespace instance_check_internal
return true;
std::wstring classNameString(className);
std::wstring wndTextString(wndText);
if (wndTextString.find(L"PrusaSlicer") == 0 && classNameString == L"wxWindowNR") {
if (wndTextString.find(L"PrusaSlicer") != std::wstring::npos && classNameString == L"wxWindowNR") {
//check if other instances has same instance hash
//if not it is not same version(binary) as this version
HANDLE handle = GetProp(hwnd, L"Instance_Hash_Minor");