Files
UnleashedRecomp-hedge-dev/UnleashedRecomp/user/paths.h
Hyper c64ef1fe15 Added error message if included DirectX DLLs are missing (#998)
* Added error message if included DirectX DLLs are missing

* locale: added System_Win32_MissingDLLs localisation

Co-Authored-By: LJSTAR <31629427+LJSTARbird@users.noreply.github.com>
Co-Authored-By: Kitzuku <25226941+Kitzuku@users.noreply.github.com>
Co-Authored-By: NextinHKRY <38560522+NextinMono@users.noreply.github.com>
Co-Authored-By: brianuuu <38166666+brianuuu@users.noreply.github.com>
Co-Authored-By: Darío <538504+DarioSamo@users.noreply.github.com>

* Fix ifdefs

---------

Co-authored-by: LJSTAR <31629427+LJSTARbird@users.noreply.github.com>
Co-authored-by: Kitzuku <25226941+Kitzuku@users.noreply.github.com>
Co-authored-by: NextinHKRY <38560522+NextinMono@users.noreply.github.com>
Co-authored-by: brianuuu <38166666+brianuuu@users.noreply.github.com>
Co-authored-by: Darío <538504+DarioSamo@users.noreply.github.com>
2025-03-07 04:47:15 +03:00

39 lines
947 B
C++

#pragma once
#include <mod/mod_loader.h>
#define USER_DIRECTORY "UnleashedRecomp"
#ifndef GAME_INSTALL_DIRECTORY
#define GAME_INSTALL_DIRECTORY "."
#endif
extern std::filesystem::path g_executableRoot;
inline std::filesystem::path GetGamePath()
{
return GAME_INSTALL_DIRECTORY;
}
bool CheckPortable();
std::filesystem::path BuildUserPath();
const std::filesystem::path& GetUserPath();
inline std::filesystem::path GetSavePath(bool checkForMods)
{
if (checkForMods && !ModLoader::s_saveFilePath.empty())
return ModLoader::s_saveFilePath.parent_path();
else
return GetUserPath() / "save";
}
// Returned file name may not necessarily be
// equal to SYS-DATA as mods can assign anything.
inline std::filesystem::path GetSaveFilePath(bool checkForMods)
{
if (checkForMods && !ModLoader::s_saveFilePath.empty())
return ModLoader::s_saveFilePath;
else
return GetSavePath(false) / "SYS-DATA";
}