From 2b1970872078166f24289342594a16d5c0f8bac8 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Thu, 11 Mar 2021 12:22:06 +0100 Subject: [PATCH] Further ChromeOS support: Detect removable media mounted through ChromeOS --- src/slic3r/GUI/OpenGLManager.cpp | 2 ++ src/slic3r/GUI/RemovableDriveManager.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/slic3r/GUI/OpenGLManager.cpp b/src/slic3r/GUI/OpenGLManager.cpp index 693f544e7..9a1eecc11 100644 --- a/src/slic3r/GUI/OpenGLManager.cpp +++ b/src/slic3r/GUI/OpenGLManager.cpp @@ -256,11 +256,13 @@ bool OpenGLManager::init_gl() } if (valid_version) { +#ifdef __linux__ if (s_gl_info.get_renderer() == "virgl") // Disable multi-sampling with virgl (VirtualGL) on Linux. // Namely, on ChromeOS virgl flips red/blue channels at least on some computers with multi-sampling enabled. // It seems it is sufficient to disable multi-sampling after the OpenGL context is created. s_multisample = EMultisampleState::Disabled; +#endif // __linux__ // load shaders auto [result, error] = m_shaders_manager.init(); if (!result) { diff --git a/src/slic3r/GUI/RemovableDriveManager.cpp b/src/slic3r/GUI/RemovableDriveManager.cpp index a1247f3a0..85d91382a 100644 --- a/src/slic3r/GUI/RemovableDriveManager.cpp +++ b/src/slic3r/GUI/RemovableDriveManager.cpp @@ -247,6 +247,9 @@ std::vector RemovableDriveManager::search_for_removable_drives() cons path = "/run" + path; pp = "/run"+pp; search_for_drives_internal::search_path(path, pp, current_drives); + + // ChromeOS specific: search /mnt/chromeos/removable/* folder + search_for_drives_internal::search_path("/mnt/chromeos/removable/*", "/mnt/chromeos/removable", current_drives); #endif return current_drives;