mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 16:31:28 +12:00
Get the font directory from Windows (#13825)
This commit is contained in:
parent
db7f84f9f8
commit
b0de5970ce
7 changed files with 37 additions and 31 deletions
|
@ -36,6 +36,7 @@
|
|||
|
||||
#include <QFileInfo> // This shouldn't be outside rpcs3qt...
|
||||
#include <QImageReader> // This shouldn't be outside rpcs3qt...
|
||||
#include <QStandardPaths> // This shouldn't be outside rpcs3qt...
|
||||
#include <thread>
|
||||
|
||||
LOG_CHANNEL(sys_log, "SYS");
|
||||
|
@ -331,5 +332,21 @@ EmuCallbacks main_application::CreateCallbacks()
|
|||
return QFileInfo(QString::fromUtf8(sv.data(), static_cast<int>(sv.size()))).canonicalFilePath().toStdString();
|
||||
};
|
||||
|
||||
callbacks.get_font_dirs = []()
|
||||
{
|
||||
const QStringList locations = QStandardPaths::standardLocations(QStandardPaths::FontsLocation);
|
||||
std::vector<std::string> font_dirs;
|
||||
for (const QString& location : locations)
|
||||
{
|
||||
std::string font_dir = location.toStdString();
|
||||
if (!font_dir.ends_with('/'))
|
||||
{
|
||||
font_dir += '/';
|
||||
}
|
||||
font_dirs.push_back(font_dir);
|
||||
}
|
||||
return font_dirs;
|
||||
};
|
||||
|
||||
return callbacks;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue