mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 12:45:57 +08:00
Detect Remote Desktop connection and use Mesa OpenGL renderer.
This commit is contained in:
parent
177f5b02fa
commit
88059baddb
@ -212,7 +212,12 @@ int wmain(int argc, wchar_t **argv)
|
|||||||
argv_extended.emplace_back(nullptr);
|
argv_extended.emplace_back(nullptr);
|
||||||
|
|
||||||
OpenGLVersionCheck opengl_version_check;
|
OpenGLVersionCheck opengl_version_check;
|
||||||
bool load_mesa = ! opengl_version_check.load_opengl_dll() || ! opengl_version_check.is_version_greater_or_equal_to(2, 0);
|
bool load_mesa =
|
||||||
|
// Running over a rempote desktop, and the RemoteFX is not enabled, therefore Windows will only provide SW OpenGL 1.1 context.
|
||||||
|
// In that case, use Mesa.
|
||||||
|
::GetSystemMetrics(SM_REMOTESESSION) ||
|
||||||
|
// Try to load the default OpenGL driver and test its context version.
|
||||||
|
! opengl_version_check.load_opengl_dll() || ! opengl_version_check.is_version_greater_or_equal_to(2, 0);
|
||||||
|
|
||||||
wchar_t path_to_exe[MAX_PATH + 1] = { 0 };
|
wchar_t path_to_exe[MAX_PATH + 1] = { 0 };
|
||||||
::GetModuleFileNameW(nullptr, path_to_exe, MAX_PATH);
|
::GetModuleFileNameW(nullptr, path_to_exe, MAX_PATH);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user