mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 06:01:12 +00:00
Add fallback font hack for Steam Link
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
#include <QNetworkProxyFactory>
|
#include <QNetworkProxyFactory>
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
|
#include <QFont>
|
||||||
|
|
||||||
// Don't let SDL hook our main function, since Qt is already
|
// Don't let SDL hook our main function, since Qt is already
|
||||||
// doing the same thing. This needs to be before any headers
|
// doing the same thing. This needs to be before any headers
|
||||||
@@ -318,6 +319,18 @@ int main(int argc, char *argv[])
|
|||||||
app.setPalette(QPalette(Qt::lightGray));
|
app.setPalette(QPalette(Qt::lightGray));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SLVIDEO
|
||||||
|
// Qt 5.9 from the Steam Link SDK is not able to load any fonts
|
||||||
|
// since the Steam Link doesn't include any of the ones it looks
|
||||||
|
// for. We know it has NotoSans so we will explicitly ask for that.
|
||||||
|
if (app.font().family().isEmpty()) {
|
||||||
|
qWarning() << "SL HACK: No default font - using NotoSans";
|
||||||
|
|
||||||
|
QFont fon("NotoSans");
|
||||||
|
app.setFont(fon);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
app.setWindowIcon(QIcon(":/res/moonlight.svg"));
|
app.setWindowIcon(QIcon(":/res/moonlight.svg"));
|
||||||
|
|
||||||
// Register our C++ types for QML
|
// Register our C++ types for QML
|
||||||
|
|||||||
Reference in New Issue
Block a user