Another attempt to fix build on Linux (due to ab00f501f1)

This commit is contained in:
Enrico Turri 2019-11-25 12:45:49 +01:00
parent eee65749d9
commit df3e47e093
2 changed files with 3 additions and 3 deletions

View file

@ -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();

View file

@ -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();