Skip to content

Commit

Permalink
Revert "tweak: added automatic selection if exe is found in suggested…
Browse files Browse the repository at this point in the history
… path"

This reverts commit 4c31140.
  • Loading branch information
ToeKneeRED committed May 4, 2024
1 parent 4c31140 commit edddcb1
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions Code/immersive_launcher/oobe/PathSelection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,7 @@ bool SelectInstall(bool aForceSelect)
auto exePath = Registry::ReadString<wchar_t>(HKEY_CURRENT_USER, kTiltedRegistryPath, L"TitleExe");

bool result = true;
bool correctExeFound = false;

if (!aForceSelect)
{
std::wstring suggestedExe = SuggestTitlePath().append(TARGET_NAME L".exe");

if (std::filesystem::exists(suggestedExe))
{
correctExeFound = true;

exePath = suggestedExe;
titlePath = exePath.substr(0, exePath.find_last_of(L'\\'));

result = Registry::WriteString(HKEY_CURRENT_USER, kTiltedRegistryPath, L"TitlePath", titlePath) &&
Registry::WriteString(HKEY_CURRENT_USER, kTiltedRegistryPath, L"TitleExe", exePath);
}
}

if (!std::filesystem::exists(titlePath) || !std::filesystem::exists(exePath) || aForceSelect || !correctExeFound)
if (!std::filesystem::exists(titlePath) || !std::filesystem::exists(exePath) || aForceSelect)
{
constexpr int kSelectionAttempts = 3;

Expand Down

0 comments on commit edddcb1

Please sign in to comment.