mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-23 15:45:46 +01:00
Merge pull request #5327 from AniLeo/master
qt: Set DISPLAY env var when not present
This commit is contained in:
commit
5dae45b958
@ -60,6 +60,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
|
||||
#include <QPushButton>
|
||||
#include <QShortcut>
|
||||
#include <QStatusBar>
|
||||
#include <QString>
|
||||
#include <QSysInfo>
|
||||
#include <QUrl>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
@ -3061,6 +3062,14 @@ int main(int argc, char* argv[]) {
|
||||
chdir(bin_path.c_str());
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
// Set the DISPLAY variable in order to open web browsers
|
||||
// TODO (lat9nq): Find a better solution for AppImages to start external applications
|
||||
if (QString::fromLocal8Bit(qgetenv("DISPLAY")).isEmpty()) {
|
||||
qputenv("DISPLAY", ":0");
|
||||
}
|
||||
#endif
|
||||
|
||||
// Enables the core to make the qt created contexts current on std::threads
|
||||
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
|
||||
QApplication app(argc, argv);
|
||||
|
Loading…
Reference in New Issue
Block a user