mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Another attempt to fix build on Linux (due to ab00f501f1)
				
					
				
			This commit is contained in:
		
							parent
							
								
									eee65749d9
								
							
						
					
					
						commit
						df3e47e093
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		|  | @ -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(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri