Changed g_gamepath into a more descriptive g_gameInstallPath

This commit is contained in:
Jujstme 2025-03-10 17:36:28 +01:00
parent 5e266cbac3
commit a60a7cefef
6 changed files with 11 additions and 11 deletions

View file

@ -33,7 +33,7 @@ PPC_FUNC_IMPL(__imp__sub_824EB490);
PPC_FUNC(sub_824EB490)
{
App::s_isInit = true;
App::s_isMissingDLC = !Installer::checkAllDLC(g_gamepath);
App::s_isMissingDLC = !Installer::checkAllDLC(g_gameInstallPath);
App::s_language = Config::Language;
SWA::SGlobals::Init();

View file

@ -315,11 +315,11 @@ uint32_t XamContentCreateEx(uint32_t dwUserIndex, const char* szRootName, const
}
else if (pContentData->dwContentType == XCONTENTTYPE_DLC)
{
root = g_gamepath + "/dlc";
root = g_gameInstallPath + "/dlc";
}
else
{
root = g_gamepath;
root = g_gameInstallPath;
}
XamRegisterContent(*pContentData, root);

View file

@ -61,8 +61,8 @@ void KiSystemStartup()
{
const auto gameContent = XamMakeContent(XCONTENTTYPE_RESERVED, "Game");
const auto updateContent = XamMakeContent(XCONTENTTYPE_RESERVED, "Update");
XamRegisterContent(gameContent, g_gamepath + "/game");
XamRegisterContent(updateContent, g_gamepath + "/update");
XamRegisterContent(gameContent, g_gameInstallPath + "/game");
XamRegisterContent(updateContent, g_gameInstallPath + "/update");
const auto saveFilePath = GetSaveFilePath(true);
bool saveFileExists = std::filesystem::exists(saveFilePath);
@ -94,7 +94,7 @@ void KiSystemStartup()
XamContentCreateEx(0, "D", &gameContent, OPEN_EXISTING, nullptr, nullptr, 0, 0, nullptr);
std::error_code ec;
for (auto& file : std::filesystem::directory_iterator(g_gamepath + "/dlc", ec))
for (auto& file : std::filesystem::directory_iterator(g_gameInstallPath + "/dlc", ec))
{
if (file.is_directory())
{
@ -244,7 +244,7 @@ int main(int argc, char *argv[])
HostStartup();
std::filesystem::path modulePath;
bool isGameInstalled = Installer::checkGameInstall(g_gamepath, modulePath);
bool isGameInstalled = Installer::checkGameInstall(g_gameInstallPath, modulePath);
bool runInstallerWizard = forceInstaller || forceDLCInstaller || !isGameInstalled;
if (runInstallerWizard)
{
@ -254,7 +254,7 @@ int main(int argc, char *argv[])
std::_Exit(1);
}
if (!InstallerWizard::Run(g_gamepath, isGameInstalled && forceDLCInstaller))
if (!InstallerWizard::Run(g_gameInstallPath, isGameInstalled && forceDLCInstaller))
{
std::_Exit(0);
}

View file

@ -100,7 +100,7 @@ void ModLoader::Init()
{
configIni = {};
if (!configIni.read(g_gamepath + "/cpkredir.ini"))
if (!configIni.read(g_gameInstallPath + "/cpkredir.ini"))
return;
}

View file

@ -3,7 +3,7 @@
std::filesystem::path g_executableRoot = os::process::GetExecutablePath().remove_filename();
std::filesystem::path g_userPath = BuildUserPath();
extern const std::string g_gamepath = GetGamePath();
extern const std::string g_gameInstallPath = GetGamePath();
bool CheckPortable()
{

View file

@ -23,7 +23,7 @@ inline std::string GetGamePath()
bool CheckPortable();
std::filesystem::path BuildUserPath();
const std::filesystem::path& GetUserPath();
extern const std::string g_gamepath;
extern const std::string g_gameInstallPath;
inline std::filesystem::path GetSavePath(bool checkForMods)
{