mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Another attempt to fix build on Linux (due to ab00f501f1)
This commit is contained in:
@@ -333,13 +333,13 @@ void Mouse3DController::render_settings_dialog(unsigned int canvas_width, unsign
|
|||||||
|
|
||||||
bool Mouse3DController::connect_device()
|
bool Mouse3DController::connect_device()
|
||||||
{
|
{
|
||||||
static const long long DETECTION_TIME = 2; // seconds
|
static const long long DETECTION_TIME_MS = 2000; // seconds
|
||||||
|
|
||||||
if (is_device_connected())
|
if (is_device_connected())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// check time since last detection took place
|
// check time since last detection took place
|
||||||
if (std::chrono::duration_cast<std::chrono::seconds>(std::chrono::high_resolution_clock::now() - m_last_time).count() < DETECTION_TIME)
|
if (std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - m_last_time).count() < DETECTION_TIME_MS)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_last_time = std::chrono::high_resolution_clock::now();
|
m_last_time = std::chrono::high_resolution_clock::now();
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class Mouse3DController
|
|||||||
std::string m_device_str;
|
std::string m_device_str;
|
||||||
bool m_running;
|
bool m_running;
|
||||||
bool m_settings_dialog;
|
bool m_settings_dialog;
|
||||||
std::chrono::time_point<std::chrono::steady_clock> m_last_time;
|
std::chrono::time_point<std::chrono::high_resolution_clock> m_last_time;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Mouse3DController();
|
Mouse3DController();
|
||||||
|
|||||||
Reference in New Issue
Block a user