diff options
| author | 2021-03-12 12:10:28 -0800 | |
|---|---|---|
| committer | 2021-03-12 12:10:28 -0800 | |
| commit | 5dae45b958908fedb4fb55def3d5ee5ad51f8266 (patch) | |
| tree | da0aae3f9aa857a794797cc43b93ab4c31b159ee | |
| parent | Merge pull request #6040 from german77/toggleKeyboard (diff) | |
| parent | qt: Set DISPLAY env var when not present (diff) | |
| download | yuzu-5dae45b958908fedb4fb55def3d5ee5ad51f8266.tar.gz yuzu-5dae45b958908fedb4fb55def3d5ee5ad51f8266.tar.xz yuzu-5dae45b958908fedb4fb55def3d5ee5ad51f8266.zip | |
Merge pull request #5327 from AniLeo/master
qt: Set DISPLAY env var when not present
Diffstat (limited to '')
| -rw-r--r-- | src/yuzu/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 56d892a31..24bfa4d34 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -60,6 +60,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual | |||
| 60 | #include <QPushButton> | 60 | #include <QPushButton> |
| 61 | #include <QShortcut> | 61 | #include <QShortcut> |
| 62 | #include <QStatusBar> | 62 | #include <QStatusBar> |
| 63 | #include <QString> | ||
| 63 | #include <QSysInfo> | 64 | #include <QSysInfo> |
| 64 | #include <QUrl> | 65 | #include <QUrl> |
| 65 | #include <QtConcurrent/QtConcurrent> | 66 | #include <QtConcurrent/QtConcurrent> |
| @@ -3061,6 +3062,14 @@ int main(int argc, char* argv[]) { | |||
| 3061 | chdir(bin_path.c_str()); | 3062 | chdir(bin_path.c_str()); |
| 3062 | #endif | 3063 | #endif |
| 3063 | 3064 | ||
| 3065 | #ifdef __linux__ | ||
| 3066 | // Set the DISPLAY variable in order to open web browsers | ||
| 3067 | // TODO (lat9nq): Find a better solution for AppImages to start external applications | ||
| 3068 | if (QString::fromLocal8Bit(qgetenv("DISPLAY")).isEmpty()) { | ||
| 3069 | qputenv("DISPLAY", ":0"); | ||
| 3070 | } | ||
| 3071 | #endif | ||
| 3072 | |||
| 3064 | // Enables the core to make the qt created contexts current on std::threads | 3073 | // Enables the core to make the qt created contexts current on std::threads |
| 3065 | QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity); | 3074 | QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity); |
| 3066 | QApplication app(argc, argv); | 3075 | QApplication app(argc, argv); |