mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-15 07:32:39 -07: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()
|
||||
{
|
||||
static const long long DETECTION_TIME = 2; // seconds
|
||||
static const long long DETECTION_TIME_MS = 2000; // seconds
|
||||
|
||||
if (is_device_connected())
|
||||
return false;
|
||||
|
||||
// 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;
|
||||
|
||||
m_last_time = std::chrono::high_resolution_clock::now();
|
||||
|
||||
@@ -131,7 +131,7 @@ class Mouse3DController
|
||||
std::string m_device_str;
|
||||
bool m_running;
|
||||
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:
|
||||
Mouse3DController();
|
||||
|
||||
Reference in New Issue
Block a user