From 737a628e83e767dc199e31385be563ff9e248c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20H=C4=83loiu?= Date: Fri, 9 Sep 2022 18:54:21 +0300 Subject: [PATCH] fix: change default ozone platform hint to auto --- shell/browser/electron_browser_main_parts_linux.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/shell/browser/electron_browser_main_parts_linux.cc b/shell/browser/electron_browser_main_parts_linux.cc index dd44fe7f97..653f5d390a 100644 --- a/shell/browser/electron_browser_main_parts_linux.cc +++ b/shell/browser/electron_browser_main_parts_linux.cc @@ -128,11 +128,13 @@ void ElectronBrowserMainParts::DetectOzonePlatform() { command_line->GetSwitchValueASCII(switches::kOzonePlatformHint); if (ozone_platform_hint.empty()) { env->GetVar(kElectronOzonePlatformHint, &ozone_platform_hint); + + if (ozone_platform_hint.empty()) { + ozone_platform_hint = "auto"; + } } - if (!ozone_platform_hint.empty()) { - command_line->AppendSwitchASCII( - switches::kOzonePlatform, MaybeFixPlatformName(ozone_platform_hint)); - } + command_line->AppendSwitchASCII(switches::kOzonePlatform, + MaybeFixPlatformName(ozone_platform_hint)); } std::string desktop_startup_id;