create sys_fonts in users folder and instructions.txt of what to put inside

This commit is contained in:
georgemoralis 2026-01-12 18:24:19 +02:00
parent 2113de96f0
commit a0014a8853
2 changed files with 13 additions and 0 deletions

View File

@ -128,6 +128,10 @@ static auto UserPaths = [] {
create_path(PathType::CustomTrophy, user_dir / CUSTOM_TROPHY);
create_path(PathType::CustomConfigs, user_dir / CUSTOM_CONFIGS);
create_path(PathType::CacheDir, user_dir / CACHE_DIR);
create_path(PathType::FontDir, user_dir / FONT_DIR);
// subdirectory for fonts
std::filesystem::create_directory(user_dir / FONT_DIR / "font");
std::filesystem::create_directory(user_dir / FONT_DIR / "font2");
std::ofstream notice_file(user_dir / CUSTOM_TROPHY / "Notice.txt");
if (notice_file.is_open()) {
@ -144,6 +148,13 @@ static auto UserPaths = [] {
notice_file.close();
}
std::ofstream font_instructions(user_dir / FONT_DIR / "Instructions.txt");
if (font_instructions.is_open()) {
font_instructions << "Place /preinst/common/font contents into font folder\n"
"Place /system/common/font2 contents into font2 folder\n";
font_instructions.close();
}
return paths;
}();

View File

@ -25,6 +25,7 @@ enum class PathType {
CustomTrophy, // Where custom files for trophies are stored.
CustomConfigs, // Where custom files for different games are stored.
CacheDir, // Where pipeline and shader cache is stored.
FontDir // Where font files are stored.
};
constexpr auto PORTABLE_DIR = "user";
@ -44,6 +45,7 @@ constexpr auto METADATA_DIR = "game_data";
constexpr auto CUSTOM_TROPHY = "custom_trophy";
constexpr auto CUSTOM_CONFIGS = "custom_configs";
constexpr auto CACHE_DIR = "cache";
constexpr auto FONT_DIR = "sys_fonts";
// Filenames
constexpr auto LOG_FILE = "shad_log.txt";