Enabling 3DConnexion polling thread in windows, when working in remote session, Adding ability to force hw rendering in remote session
This commit is contained in:
parent
4a22339621
commit
cafdbb47ef
@ -242,13 +242,14 @@ int wmain(int argc, wchar_t **argv)
|
||||
#ifdef SLIC3R_GUI
|
||||
// Here one may push some additional parameters based on the wrapper type.
|
||||
bool force_mesa = false;
|
||||
bool force_hw = false;
|
||||
#endif /* SLIC3R_GUI */
|
||||
for (int i = 1; i < argc; ++ i) {
|
||||
#ifdef SLIC3R_GUI
|
||||
if (wcscmp(argv[i], L"--sw-renderer") == 0)
|
||||
force_mesa = true;
|
||||
else if (wcscmp(argv[i], L"--no-sw-renderer") == 0)
|
||||
force_mesa = false;
|
||||
force_hw = true;
|
||||
#endif /* SLIC3R_GUI */
|
||||
argv_extended.emplace_back(argv[i]);
|
||||
}
|
||||
@ -261,7 +262,7 @@ int wmain(int argc, wchar_t **argv)
|
||||
force_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) ||
|
||||
(::GetSystemMetrics(SM_REMOTESESSION) && !force_hw) ||
|
||||
// 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);
|
||||
#endif /* SLIC3R_GUI */
|
||||
|
@ -668,6 +668,11 @@ void Mouse3DController::init()
|
||||
#ifndef _WIN32
|
||||
// Don't start the background thread on Windows, as the HID messages are sent as Windows messages.
|
||||
m_thread = std::thread(&Mouse3DController::run, this);
|
||||
#else
|
||||
// For some reason, HID message routing does not work well with remote session. Requires further investigation
|
||||
if (::GetSystemMetrics(SM_REMOTESESSION)) {
|
||||
m_thread = std::thread(&Mouse3DController::run, this);
|
||||
}
|
||||
#endif // _WIN32
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user