Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVojtech Bubnik <bubnikv@gmail.com>2021-03-11 14:22:06 +0300
committerVojtech Bubnik <bubnikv@gmail.com>2021-03-15 11:55:57 +0300
commit2b1970872078166f24289342594a16d5c0f8bac8 (patch)
treec949ccaef0f7f1a53959f3a7219d6f1a4b60580a /src
parent9c80c6a4af809c009c98225d8a79472b4dad73d2 (diff)
Further ChromeOS support: Detect removable media mounted through ChromeOS
Diffstat (limited to 'src')
-rw-r--r--src/slic3r/GUI/OpenGLManager.cpp2
-rw-r--r--src/slic3r/GUI/RemovableDriveManager.cpp3
2 files changed, 5 insertions, 0 deletions
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<DriveData> 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;