mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	common/vector_math: Move Vec[x] types into the Common namespace
These types are within the common library, so they should be using the Common namespace.
This commit is contained in:
		
							parent
							
								
									db58652680
								
							
						
					
					
						commit
						643472e24a
					
				
					 40 changed files with 309 additions and 301 deletions
				
			
		|  | @ -162,8 +162,8 @@ void Client::OnPadData(Response::PadData data) { | |||
|     // Due to differences between the 3ds and cemuhookudp motion directions, we need to invert
 | ||||
|     // accel.x and accel.z and also invert pitch and yaw. See
 | ||||
|     // https://github.com/citra-emu/citra/pull/4049 for more details on gyro/accel
 | ||||
|     Math::Vec3f accel = Math::MakeVec<float>(-data.accel.x, data.accel.y, -data.accel.z); | ||||
|     Math::Vec3f gyro = Math::MakeVec<float>(-data.gyro.pitch, -data.gyro.yaw, data.gyro.roll); | ||||
|     Common::Vec3f accel = Common::MakeVec<float>(-data.accel.x, data.accel.y, -data.accel.z); | ||||
|     Common::Vec3f gyro = Common::MakeVec<float>(-data.gyro.pitch, -data.gyro.yaw, data.gyro.roll); | ||||
|     { | ||||
|         std::lock_guard<std::mutex> guard(status->update_mutex); | ||||
| 
 | ||||
|  | @ -217,8 +217,7 @@ void TestCommunication(const std::string& host, u16 port, u8 pad_index, u32 clie | |||
|             success_callback(); | ||||
|         else | ||||
|             failure_callback(); | ||||
|     }) | ||||
|         .detach(); | ||||
|     }).detach(); | ||||
| } | ||||
| 
 | ||||
| CalibrationConfigurationJob::CalibrationConfigurationJob( | ||||
|  | @ -269,8 +268,7 @@ CalibrationConfigurationJob::CalibrationConfigurationJob( | |||
|         complete_event.Wait(); | ||||
|         socket.Stop(); | ||||
|         worker_thread.join(); | ||||
|     }) | ||||
|         .detach(); | ||||
|     }).detach(); | ||||
| } | ||||
| 
 | ||||
| CalibrationConfigurationJob::~CalibrationConfigurationJob() { | ||||
|  |  | |||
|  | @ -31,7 +31,7 @@ struct Version; | |||
| 
 | ||||
| struct DeviceStatus { | ||||
|     std::mutex update_mutex; | ||||
|     std::tuple<Math::Vec3<float>, Math::Vec3<float>> motion_status; | ||||
|     std::tuple<Common::Vec3<float>, Common::Vec3<float>> motion_status; | ||||
|     std::tuple<float, float, bool> touch_status; | ||||
| 
 | ||||
|     // calibration data for scaling the device's touch area to 3ds
 | ||||
|  |  | |||
|  | @ -26,7 +26,7 @@ private: | |||
| class UDPMotionDevice final : public Input::MotionDevice { | ||||
| public: | ||||
|     explicit UDPMotionDevice(std::shared_ptr<DeviceStatus> status_) : status(std::move(status_)) {} | ||||
|     std::tuple<Math::Vec3<float>, Math::Vec3<float>> GetStatus() const { | ||||
|     std::tuple<Common::Vec3<float>, Common::Vec3<float>> GetStatus() const { | ||||
|         std::lock_guard<std::mutex> guard(status->update_mutex); | ||||
|         return status->motion_status; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue