From b37cfb66bcc744dc2b0f95e29f7bc26bb8ac1df6 Mon Sep 17 00:00:00 2001 From: rankun Date: Mon, 15 Jun 2020 13:28:30 +0800 Subject: [PATCH] fix: config path bug on mac --- QtScrcpy/main.cpp | 1 + QtScrcpy/util/config.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/QtScrcpy/main.cpp b/QtScrcpy/main.cpp index 2638961..890ee43 100644 --- a/QtScrcpy/main.cpp +++ b/QtScrcpy/main.cpp @@ -44,6 +44,7 @@ int main(int argc, char *argv[]) g_msgType = covertLogLevel(Config::getInstance().getLogLevel()); // set on QApplication before + // bug: config path is error on mac int opengl = Config::getInstance().getDesktopOpenGL(); if (0 == opengl) { QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL); diff --git a/QtScrcpy/util/config.cpp b/QtScrcpy/util/config.cpp index e363bc4..c30fa0c 100644 --- a/QtScrcpy/util/config.cpp +++ b/QtScrcpy/util/config.cpp @@ -14,7 +14,7 @@ #define COMMON_PUSHFILE_DEF "/sdcard/" #define COMMON_SERVER_VERSION_KEY "ServerVersion" -#define COMMON_SERVER_VERSION_DEF "1.12.1" +#define COMMON_SERVER_VERSION_DEF "1.14" #define COMMON_SERVER_PATH_KEY "ServerPath" #define COMMON_SERVER_PATH_DEF "/data/local/tmp/scrcpy-server.jar" @@ -77,7 +77,7 @@ Config &Config::getInstance() static Config config; return config; } -#include + const QString &Config::getConfigPath() { if (s_configPath.isEmpty()) {