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) PPC_FUNC(sub_824EB490)
{ {
App::s_isInit = true; App::s_isInit = true;
App::s_isMissingDLC = !Installer::checkAllDLC(g_gamepath); App::s_isMissingDLC = !Installer::checkAllDLC(g_gameInstallPath);
App::s_language = Config::Language; App::s_language = Config::Language;
SWA::SGlobals::Init(); 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) else if (pContentData->dwContentType == XCONTENTTYPE_DLC)
{ {
root = g_gamepath + "/dlc"; root = g_gameInstallPath + "/dlc";
} }
else else
{ {
root = g_gamepath; root = g_gameInstallPath;
} }
XamRegisterContent(*pContentData, root); XamRegisterContent(*pContentData, root);

View file

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

View file

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

View file

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

View file

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