Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
Change path for Windows Store UWP app. (#2041)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNexusAvenger authored Nov 10, 2023
1 parent 5d2cbac commit 38371f0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,17 @@ class RobloxInstance

printf("[%u] Attached to PID %u, version folder %ls\n", process.id, process.id, version_folder.c_str());

// Special case for Windows Store / "UWP" app.
// The process will point to a read-only location while settings are stored elsewhere.
if (version_folder.string().find("WindowsApps") != std::string::npos)
{
auto local_app_data_path = static_cast<std::string>(getenv("LOCALAPPDATA"));
auto uwp_versioned_name = version_folder.filename().string();
auto uwp_settings_name = uwp_versioned_name.substr(0, uwp_versioned_name.find('_')) + uwp_versioned_name.substr(uwp_versioned_name.rfind('_'));
version_folder = std::filesystem::path(local_app_data_path + "\\Packages\\" + uwp_settings_name + "\\LocalState");
printf("[%u] Windows Store path was found. Using %ls\n", process.id, version_folder.c_str());
}

OnEvent(RFU::Event::SETTINGS_MASK);
MemoryWriteTick();

Expand Down

0 comments on commit 38371f0

Please sign in to comment.