mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-03-03 20:46:37 +00:00
Compare commits
4 Commits
ebfc00d015
...
6c1400e62c
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c1400e62c | |||
| 25fb5285f7 | |||
|
|
87059f8ca3 | ||
| db299c6930 |
@@ -304,7 +304,14 @@ extern "C"
|
||||
mlx::Error("Font loader: filepath is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
std::filesystem::path file(filepath);
|
||||
if (std::strcmp(filepath, "default") != 0 && !std::filesystem::exists(file))
|
||||
{
|
||||
mlx::Error("TTF loader: unable to find file '%'", filepath);
|
||||
return;
|
||||
}
|
||||
|
||||
if(std::strcmp(filepath, "default") != 0 && file.extension() != ".ttf" && file.extension() != ".tte")
|
||||
{
|
||||
mlx::Error("TTF loader: not a truetype font file '%'", filepath);
|
||||
@@ -324,7 +331,14 @@ extern "C"
|
||||
mlx::Error("Font loader: filepath is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
std::filesystem::path file(filepath);
|
||||
if (std::strcmp(filepath, "default") != 0 && !std::filesystem::exists(file))
|
||||
{
|
||||
mlx::Error("TTF loader: unable to find file '%'", filepath);
|
||||
return;
|
||||
}
|
||||
|
||||
if(std::strcmp(filepath, "default") != 0 && file.extension() != ".ttf" && file.extension() != ".tte")
|
||||
{
|
||||
mlx::Error("TTF loader: not a truetype font file '%'", filepath);
|
||||
|
||||
Reference in New Issue
Block a user